Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Checking for null value in dropdown datawindow

4 posts in DataWindow Last posting was on 2009-01-30 18:21:05.0Z
Sri Posted on 2009-01-30 00:47:45.0Z
From: Sri <crazysrinath@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Checking for null value in dropdown datawindow
Date: Thu, 29 Jan 2009 16:47:45 -0800 (PST)
Organization: http://groups.google.com
Lines: 22
Message-ID: <76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com>
NNTP-Posting-Host: 116.75.208.50
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1233276465 30259 127.0.0.1 (30 Jan 2009 00:47:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 30 Jan 2009 00:47:45 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s1g2000prg.googlegroups.com; posting-host=116.75.208.50; posting-account=F9e4SQoAAABWwr_PYyru5O1UuI7c9I0p
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!s1g2000prg.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88702
Article PK: 417956

Hi

Please help. Very Urgent. Its a simple one though I am not able to
figure it out.

I have a datawindow dw_test(say) with the column delivery_id as a
dropdowndatawindow with 2 options Post and Mail. While retrieving from
the database I need to check the value of the delivery_id. If its null
then I need to choose the Post option from the dropdown.

Will this code work

for ll_row = 1 to dw_test.rowcount()

if isnull(dw_test.getitemnumber(1,'delivery_id)) then

dw_test.object.delivery_id[ll_row] = 1 or dw_test.setitemnumber
(ll_row,'delivery_id',1)

end if

Please let me know. thanks


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-01-30 02:08:48.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com>
Subject: Re: Checking for null value in dropdown datawindow
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49826130$1@forums-1-dub>
Date: 29 Jan 2009 18:08:48 -0800
X-Trace: forums-1-dub 1233281328 10.22.241.152 (29 Jan 2009 18:08:48 -0800)
X-Original-Trace: 29 Jan 2009 18:08:48 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88703
Article PK: 417957

if isnull(dw_test.getitemnumber(ll_row,'delivery_id)) then
-------

For efficiency, evaluate RowCount() before the loop, your way evaluates it
on every iteration. Also, use SetItemNumber rather than dot notation for a
single item. It looks cleaner but a lot of stuff goes on behind the scenes.

Consider using the Initial property to set the column value in new rows,
since null is not allowed.

"Sri" <crazysrinath@gmail.com> wrote in message
news:76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com...
> Hi
>
> Please help. Very Urgent. Its a simple one though I am not able to
> figure it out.
>
> I have a datawindow dw_test(say) with the column delivery_id as a
> dropdowndatawindow with 2 options Post and Mail. While retrieving from
> the database I need to check the value of the delivery_id. If its null
> then I need to choose the Post option from the dropdown.
>
> Will this code work
>
> for ll_row = 1 to dw_test.rowcount()
>
> if isnull(dw_test.getitemnumber(1,'delivery_id)) then
>
> dw_test.object.delivery_id[ll_row] = 1 or dw_test.setitemnumber
> (ll_row,'delivery_id',1)
>
> end if
>
> Please let me know. thanks


Sri Posted on 2009-01-30 15:12:55.0Z
From: Sri <crazysrinath@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Checking for null value in dropdown datawindow
Date: Fri, 30 Jan 2009 07:12:55 -0800 (PST)
Organization: http://groups.google.com
Lines: 55
Message-ID: <f68caacf-7eae-4e44-8005-42ee58083295@f40g2000pri.googlegroups.com>
References: <76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com> <49826130$1@forums-1-dub>
NNTP-Posting-Host: 116.75.208.50
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1233328375 1837 127.0.0.1 (30 Jan 2009 15:12:55 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 30 Jan 2009 15:12:55 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f40g2000pri.googlegroups.com; posting-host=116.75.208.50; posting-account=F9e4SQoAAABWwr_PYyru5O1UuI7c9I0p
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!f40g2000pri.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88704
Article PK: 417958

On Jan 30, 7:08 am, "Jerry Siegel [TeamSybase]"

<jNOsSPAMsiegel@yahoo!.com> wrote:
>  if isnull(dw_test.getitemnumber(ll_row,'delivery_id)) then
>                                                 -------
>
> For efficiency, evaluate RowCount() before the loop, your way evaluates it
> on every iteration. Also, use SetItemNumber rather than dot notation for a
> single item. It looks cleaner but a lot of stuff goes on behind the scenes.
>
> Consider using the Initial property to set the column value in new rows,
> since null is not allowed.
>
> "Sri" <crazysrin...@gmail.com> wrote in message
>
> news:76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com...
>
>
>
> > Hi
>
> > Please help. Very Urgent. Its a simple one though I am not able to
> > figure it out.
>
> > I have a datawindow dw_test(say) with the column delivery_id as a
> > dropdowndatawindow with 2 options Post and Mail. While retrieving from
> > the database I need to check the value of the delivery_id. If its null
> > then I need to choose the Post option from the dropdown.
>
> > Will this code work
>
> > for ll_row = 1 to dw_test.rowcount()
>
> > if isnull(dw_test.getitemnumber(1,'delivery_id)) then
>
> > dw_test.object.delivery_id[ll_row] = 1 or dw_test.setitemnumber
> > (ll_row,'delivery_id',1)
>
> > end if
>
> > Please let me know. thanks- Hide quoted text -
>
> - Show quoted text -

Hi Jerry,

Thanks a lot for your reply.. I didnt get what you meant by initial
property.. can you explain that for me with an example or code
thanks..


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-01-30 18:21:05.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com> <49826130$1@forums-1-dub> <f68caacf-7eae-4e44-8005-42ee58083295@f40g2000pri.googlegroups.com>
Subject: Re: Checking for null value in dropdown datawindow
Lines: 59
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49834511@forums-1-dub>
Date: 30 Jan 2009 10:21:05 -0800
X-Trace: forums-1-dub 1233339665 10.22.241.152 (30 Jan 2009 10:21:05 -0800)
X-Original-Trace: 30 Jan 2009 10:21:05 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88705
Article PK: 417959

If you look in the column specifications pane of the DW painter you will see
a column labeled Initial Value. You can also use <DW Control
Name>.Modify("<Columnname>.Initial='<initial value>'")

"Sri" <crazysrinath@gmail.com> wrote in message
news:f68caacf-7eae-4e44-8005-42ee58083295@f40g2000pri.googlegroups.com...
On Jan 30, 7:08 am, "Jerry Siegel [TeamSybase]"

<jNOsSPAMsiegel@yahoo!.com> wrote:
> if isnull(dw_test.getitemnumber(ll_row,'delivery_id)) then
> -------
>
> For efficiency, evaluate RowCount() before the loop, your way evaluates it
> on every iteration. Also, use SetItemNumber rather than dot notation for a
> single item. It looks cleaner but a lot of stuff goes on behind the
> scenes.
>
> Consider using the Initial property to set the column value in new rows,
> since null is not allowed.
>
> "Sri" <crazysrin...@gmail.com> wrote in message
>
> news:76ce29f9-bc71-45c6-a6e0-a12fd1c06b3a@s1g2000prg.googlegroups.com...
>
>
>
> > Hi
>
> > Please help. Very Urgent. Its a simple one though I am not able to
> > figure it out.
>
> > I have a datawindow dw_test(say) with the column delivery_id as a
> > dropdowndatawindow with 2 options Post and Mail. While retrieving from
> > the database I need to check the value of the delivery_id. If its null
> > then I need to choose the Post option from the dropdown.
>
> > Will this code work
>
> > for ll_row = 1 to dw_test.rowcount()
>
> > if isnull(dw_test.getitemnumber(1,'delivery_id)) then
>
> > dw_test.object.delivery_id[ll_row] = 1 or dw_test.setitemnumber
> > (ll_row,'delivery_id',1)
>
> > end if
>
> > Please let me know. thanks- Hide quoted text -
>
> - Show quoted text -

Hi Jerry,

Thanks a lot for your reply.. I didnt get what you meant by initial
property.. can you explain that for me with an example or code
thanks..