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.

Compare the last in one row with the first in the next row

12 posts in DataWindow Last posting was on 2008-09-09 18:07:27.0Z
Melanie ellingson Posted on 2008-09-05 17:23:03.0Z
Mime-Version: 1.0
X-Newsreader: Groupwise 6.5
From: "Melanie ellingson" <melanie@empireairlines.com>
Subject: Compare the last in one row with the first in the next row
Newsgroups: sybase.public.powerbuilder.datawindow
Content-Type: multipart/alternative; boundary="____QVLZYPRMMGJPQCYPSFRH____"
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c16af7$1@forums-1-dub>
Date: 5 Sep 2008 10:23:03 -0700
X-Trace: forums-1-dub 1220635383 10.22.241.152 (5 Sep 2008 10:23:03 -0700)
X-Original-Trace: 5 Sep 2008 10:23:03 -0700, vip152.sybase.com
Lines: 43
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87709
Article PK: 416967

In our timecard datawindow, I want to highlight where there are 'gaps'.
 
1/1/08 08:00 1/1/08 11:00
1/1/08 12:00 1/1/08 05:00
 
I want the 12:00 to be highlighted because it isn't the same as the second datetime in the previous row.
 
Can someone help me with some script for this?
 


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-09-05 17:38:04.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
References: <48c16af7$1@forums-1-dub>
In-Reply-To: <48c16af7$1@forums-1-dub>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c16e7c$1@forums-1-dub>
Date: 5 Sep 2008 10:38:04 -0700
X-Trace: forums-1-dub 1220636284 10.22.241.152 (5 Sep 2008 10:38:04 -0700)
X-Original-Trace: 5 Sep 2008 10:38:04 -0700, vip152.sybase.com
Lines: 24
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87710
Article PK: 416965

I'm using column names of "time1" and "time2" for this example. Your
datawindow expression will look something like:

if ( getrow () = 1 , <not highlighted> , if ( time1 = time2[-1] , <not
highlighted> , <highlighted> ) )


The "time2[-1]" bit means to check the value of the "time2" column from
the previous row. Of course, there is no previous row when you're on the
first row; that's why you have to check for "getrow() = 1" first.

Melanie ellingson wrote:
> In our timecard datawindow, I want to highlight where there are 'gaps'.
>
> 1/1/08 08:00 1/1/08 11:00
> 1/1/08 12:00 1/1/08 05:00
>
> I want the 12:00 to be highlighted because it isn't the same as the
> second datetime in the previous row.
>
> Can someone help me with some script for this?
>


melanie Posted on 2008-09-05 17:47:51.0Z
Sender: 31cd.48c16f07.1804289383@sybase.com
From: melanie
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48c170c7.3214.1681692777@sybase.com>
References: <48c16af7$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Sep 2008 10:47:51 -0700
X-Trace: forums-1-dub 1220636871 10.22.241.41 (5 Sep 2008 10:47:51 -0700)
X-Original-Trace: 5 Sep 2008 10:47:51 -0700, 10.22.241.41
Lines: 5
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87711
Article PK: 416966

works great! Can I throw one more item in to the mix? We
have a pay day column in the rows - if the pay days are
different then don't highlight because we've changed days -
it's ok for the end time and next start time to be
different.


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-09-05 18:08:26.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
References: <48c16af7$1@forums-1-dub> <48c170c7.3214.1681692777@sybase.com>
In-Reply-To: <48c170c7.3214.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c1759a$1@forums-1-dub>
Date: 5 Sep 2008 11:08:26 -0700
X-Trace: forums-1-dub 1220638106 10.22.241.152 (5 Sep 2008 11:08:26 -0700)
X-Original-Trace: 5 Sep 2008 11:08:26 -0700, vip152.sybase.com
Lines: 9
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87712
Article PK: 416968

if ( getrow () = 1 , <not highlighted> , if ( ( time1 = time2[-1] ) and
( payday <> payday[-1] ) , <not highlighted> , <highlighted> ) )

melanie wrote:
> works great! Can I throw one more item in to the mix? We
> have a pay day column in the rows - if the pay days are
> different then don't highlight because we've changed days -
> it's ok for the end time and next start time to be
> different.


melanie Posted on 2008-09-05 18:17:22.0Z
Sender: 332d.48c17768.1804289383@sybase.com
From: Melanie
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48c177b2.333f.1681692777@sybase.com>
References: <48c1759a$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Sep 2008 11:17:22 -0700
X-Trace: forums-1-dub 1220638642 10.22.241.41 (5 Sep 2008 11:17:22 -0700)
X-Original-Trace: 5 Sep 2008 11:17:22 -0700, 10.22.241.41
Lines: 4
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87713
Article PK: 416969

I got it on my own - thanks. I wasn't aware of the [-1]???
Is that documented somewhere? It seems quite powerful and
I'm beginning to think of all kinds of places I could use
it.


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-09-05 19:53:18.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
References: <48c1759a$1@forums-1-dub> <48c177b2.333f.1681692777@sybase.com>
In-Reply-To: <48c177b2.333f.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c18e2e$1@forums-1-dub>
Date: 5 Sep 2008 12:53:18 -0700
X-Trace: forums-1-dub 1220644398 10.22.241.152 (5 Sep 2008 12:53:18 -0700)
X-Original-Trace: 5 Sep 2008 12:53:18 -0700, vip152.sybase.com
Lines: 8
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87714
Article PK: 416970

I thought it was documented, but I can't find it for some reason.

Melanie wrote:
> I got it on my own - thanks. I wasn't aware of the [-1]???
> Is that documented somewhere? It seems quite powerful and
> I'm beginning to think of all kinds of places I could use
> it.


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-09-05 20:01:32.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c1759a$1@forums-1-dub> <48c177b2.333f.1681692777@sybase.com>
Subject: Re: Compare the last in one row with the first in the next row
Lines: 10
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: <48c1901c@forums-1-dub>
Date: 5 Sep 2008 13:01:32 -0700
X-Trace: forums-1-dub 1220644892 10.22.241.152 (5 Sep 2008 13:01:32 -0700)
X-Original-Trace: 5 Sep 2008 13:01:32 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87715
Article PK: 416971

I know I saw it somewhere but I just spent half an hour hunting through the
documentation and couldn't locate it :^(

<Melanie> wrote in message news:48c177b2.333f.1681692777@sybase.com...
>I got it on my own - thanks. I wasn't aware of the [-1]???
> Is that documented somewhere? It seems quite powerful and
> I'm beginning to think of all kinds of places I could use
> it.


melanie Posted on 2008-09-05 20:04:36.0Z
Sender: 37ed.48c1909b.1804289383@sybase.com
From: Melanie
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48c190d4.37f8.1681692777@sybase.com>
References: <48c1901c@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Sep 2008 13:04:36 -0700
X-Trace: forums-1-dub 1220645076 10.22.241.41 (5 Sep 2008 13:04:36 -0700)
X-Original-Trace: 5 Sep 2008 13:04:36 -0700, 10.22.241.41
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87716
Article PK: 416972

Well that makes me feel better anyway since I've never seen
it!


Daniel Jenkins Posted on 2008-09-07 09:03:06.0Z
From: Daniel Jenkins <danieldotjenkins@gacworlddotcom.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Compare the last in one row with the first in the next row
References: <48c1901c@forums-1-dub> <48c190d4.37f8.1681692777@sybase.com>
In-Reply-To: <48c190d4.37f8.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c398ca@forums-1-dub>
Date: 7 Sep 2008 02:03:06 -0700
X-Trace: forums-1-dub 1220778186 10.22.241.152 (7 Sep 2008 02:03:06 -0700)
X-Original-Trace: 7 Sep 2008 02:03:06 -0700, vip152.sybase.com
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87722
Article PK: 416980

See "Adding Controls to a DataWindow object" in the DataWindow
Programmers Guide.

Daniel.

Melanie wrote:
> Well that makes me feel better anyway since I've never seen
> it!


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-09-07 17:11:23.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c1901c@forums-1-dub> <48c190d4.37f8.1681692777@sybase.com> <48c398ca@forums-1-dub>
Subject: Re: Compare the last in one row with the first in the next row
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <48c40b3b@forums-1-dub>
Date: 7 Sep 2008 10:11:23 -0700
X-Trace: forums-1-dub 1220807483 10.22.241.152 (7 Sep 2008 10:11:23 -0700)
X-Original-Trace: 7 Sep 2008 10:11:23 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87723
Article PK: 416978

Great find! For the record:
Referring to next and previous rows
You can refer to other rows in a computed field. This is particularly useful
in N-Up DataWindow objects when you want to refer to another row in the
detail band. Use this syntax:



ColumnName[x]

where x is an integer. 0 refers to the current row (or first row in the
detail band), 1 refers to the next row, -1 refers to the previous row, and
so on.

"Daniel Jenkins" <danieldotjenkins@gacworlddotcom.com> wrote in message
news:48c398ca@forums-1-dub...
> See "Adding Controls to a DataWindow object" in the DataWindow Programmers
> Guide.
>
> Daniel.
>
> Melanie wrote:
>> Well that makes me feel better anyway since I've never seen
>> it!


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-09-07 17:14:20.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c1901c@forums-1-dub> <48c190d4.37f8.1681692777@sybase.com> <48c398ca@forums-1-dub>
Subject: Re: Compare the last in one row with the first in the next row
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
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: <48c40bec@forums-1-dub>
Date: 7 Sep 2008 10:14:20 -0700
X-Trace: forums-1-dub 1220807660 10.22.241.152 (7 Sep 2008 10:14:20 -0700)
X-Original-Trace: 7 Sep 2008 10:14:20 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87724
Article PK: 416979

This is actually in the PowerBuilder User's Guide, Chapter 20

"Daniel Jenkins" <danieldotjenkins@gacworlddotcom.com> wrote in message
news:48c398ca@forums-1-dub...
> See "Adding Controls to a DataWindow object" in the DataWindow Programmers
> Guide.
>
> Daniel.
>
> Melanie wrote:
>> Well that makes me feel better anyway since I've never seen
>> it!


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2008-09-09 18:07:27.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48c1901c@forums-1-dub> <48c190d4.37f8.1681692777@sybase.com> <48c398ca@forums-1-dub> <48c40bec@forums-1-dub>
Subject: Re: Compare the last in one row with the first in the next row
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48c6bb5f@forums-1-dub>
Date: 9 Sep 2008 11:07:27 -0700
X-Trace: forums-1-dub 1220983647 10.22.241.152 (9 Sep 2008 11:07:27 -0700)
X-Original-Trace: 9 Sep 2008 11:07:27 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87730
Article PK: 416987

Submitted as case
11474049 and ISUG issue 3500

"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message
news:48c40bec@forums-1-dub...
> This is actually in the PowerBuilder User's Guide, Chapter 20
>
> "Daniel Jenkins" <danieldotjenkins@gacworlddotcom.com> wrote in message
> news:48c398ca@forums-1-dub...
>> See "Adding Controls to a DataWindow object" in the DataWindow
>> Programmers Guide.
>>
>> Daniel.
>>
>> Melanie wrote:
>>> Well that makes me feel better anyway since I've never seen
>>> it!
>
>