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.

getting a rownumber within a group

18 posts in DataWindow Last posting was on 2008-06-04 21:44:22.0Z
cln Posted on 2008-06-03 17:07:40.0Z
Sender: 3b93.4845788a.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: getting a rownumber within a group
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48457a5c.3c04.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Jun 2008 10:07:40 -0700
X-Trace: forums-1-dub 1212512860 10.22.241.41 (3 Jun 2008 10:07:40 -0700)
X-Original-Trace: 3 Jun 2008 10:07:40 -0700, 10.22.241.41
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87043
Article PK: 416299

Is there a way to find out what line/row number is currently
selected within a group?

I know I can get to what row number is selected through all,
but I want to change the tab order on a field only if it's
the first row within a group. So the selected row might be
row 10 within the data window overall, but it's the 2nd row
within a group so I want the tab order to be turned off on
column.

The problem I'm trying to solve is that I'm using a
'suppress repeating values' on a column so it only shows up
on row 1 of a group, but because it's editable, when the
user clicks on another row in the group and the mouse is in
the same area where that column would be, then the column
shows up on that 2nd line so it gets confusing to the user.
I don't ever want it to appear.


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-06-03 17:15:51.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
References: <48457a5c.3c04.1681692777@sybase.com>
In-Reply-To: <48457a5c.3c04.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: <48457c47$1@forums-1-dub>
Date: 3 Jun 2008 10:15:51 -0700
X-Trace: forums-1-dub 1212513351 10.22.241.152 (3 Jun 2008 10:15:51 -0700)
X-Original-Trace: 3 Jun 2008 10:15:51 -0700, vip152.sybase.com
Lines: 23
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87045
Article PK: 416303

Have you thought about using an expression on the visible property
instead? I've done it many times, but haven't paid any attention to the
behavior when editing the field, so I don't know what to expect.

cln wrote:
> Is there a way to find out what line/row number is currently
> selected within a group?
>
> I know I can get to what row number is selected through all,
> but I want to change the tab order on a field only if it's
> the first row within a group. So the selected row might be
> row 10 within the data window overall, but it's the 2nd row
> within a group so I want the tab order to be turned off on
> column.
>
> The problem I'm trying to solve is that I'm using a
> 'suppress repeating values' on a column so it only shows up
> on row 1 of a group, but because it's editable, when the
> user clicks on another row in the group and the mouse is in
> the same area where that column would be, then the column
> shows up on that 2nd line so it gets confusing to the user.
> I don't ever want it to appear.


cln Posted on 2008-06-03 19:21:00.0Z
Sender: 2317.4844a599.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4845999c.4126.1681692777@sybase.com>
References: <48457c47$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Jun 2008 12:21:00 -0700
X-Trace: forums-1-dub 1212520860 10.22.241.41 (3 Jun 2008 12:21:00 -0700)
X-Original-Trace: 3 Jun 2008 12:21:00 -0700, 10.22.241.41
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87047
Article PK: 416305

That is a good idea and I will certainly try the visible
property in datawindow now, but wouldn't that logic still
require me identifying if the current row is the first row
in the group or not? And if it does, that's where I'm
stuck...

> Have you thought about using an expression on the visible
> property instead? I've done it many times, but haven't
> paid any attention to the behavior when editing the field
> , so I don't know what to expect.
>
>
> cln wrote:
> > Is there a way to find out what line/row number is
> > currently selected within a group?
> >
> > I know I can get to what row number is selected through
> > all, but I want to change the tab order on a field only
> > if it's the first row within a group. So the selected
> > row might be row 10 within the data window overall, but
> > it's the 2nd row within a group so I want the tab order
> > to be turned off on column.
> >
> > The problem I'm trying to solve is that I'm using a
> > 'suppress repeating values' on a column so it only shows
> > up on row 1 of a group, but because it's editable, when
> > the user clicks on another row in the group and the
> > mouse is in the same area where that column would be,
> > then the column shows up on that 2nd line so it gets
> > confusing to the user. I don't ever want it to appear.


Jeremy Lakeman Posted on 2008-06-04 13:26:07.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
References: <48457c47$1@forums-1-dub> <4845999c.4126.1681692777@sybase.com> <4845a92e@forums-1-dub>
In-Reply-To: <4845a92e@forums-1-dub>
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: <484697ef$1@forums-1-dub>
Date: 4 Jun 2008 06:26:07 -0700
X-Trace: forums-1-dub 1212585967 10.22.241.152 (4 Jun 2008 06:26:07 -0700)
X-Original-Trace: 4 Jun 2008 06:26:07 -0700, vip152.sybase.com
Lines: 13
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87063
Article PK: 416319

I'll see your expression and raise you something even more generic;

if(getrow() = min(getrow() for group 1), 1, 0)

Jason 'Bug' Fenter [TeamSybase] wrote:
> if ( getrow () = 1 , 1 , if ( <column name> = <column name>[-1] , 0 , 1
> ) )
>
>
> Of course, replace "<column name>" with the actual column name.
>
>
>


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-06-04 13:54:49.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
References: <48457c47$1@forums-1-dub> <4845999c.4126.1681692777@sybase.com> <4845a92e@forums-1-dub> <484697ef$1@forums-1-dub>
In-Reply-To: <484697ef$1@forums-1-dub>
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: <48469ea9$1@forums-1-dub>
Date: 4 Jun 2008 06:54:49 -0700
X-Trace: forums-1-dub 1212587689 10.22.241.152 (4 Jun 2008 06:54:49 -0700)
X-Original-Trace: 4 Jun 2008 06:54:49 -0700, vip152.sybase.com
Lines: 22
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87065
Article PK: 416322

I'll see that bet and call. What if the OP isn't suppressing repeating
values on the column that's getting grouped? ;)


However, I like that expression and will tuck it away for future use. So
now that I've learned something today, can I go home?

Jeremy Lakeman wrote:
> I'll see your expression and raise you something even more generic;
>
> if(getrow() = min(getrow() for group 1), 1, 0)
>
> Jason 'Bug' Fenter [TeamSybase] wrote:
>> if ( getrow () = 1 , 1 , if ( <column name> = <column name>[-1] , 0 ,
>> 1 ) )
>>
>>
>> Of course, replace "<column name>" with the actual column name.
>>
>>
>>


cln Posted on 2008-06-04 19:04:04.0Z
Sender: 6258.4846e633.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4846e724.628b.1681692777@sybase.com>
References: <48469ea9$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Jun 2008 12:04:04 -0700
X-Trace: forums-1-dub 1212606244 10.22.241.41 (4 Jun 2008 12:04:04 -0700)
X-Original-Trace: 4 Jun 2008 12:04:04 -0700, 10.22.241.41
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87071
Article PK: 416327

If you can help me get it to work with an editable field you
can and you can go with a HUGE box of chocolates (or red
vines, my personal favorite). I sent an earlier post, the
edit mask for DATE that I have on the field doesn't allow me
the option to add a function to the 'Display Only' (protect)
property. Any other ideas?

> I'll see that bet and call. What if the OP isn't
> suppressing repeating values on the column that's getting
> grouped? ;)
>
>
> However, I like that expression and will tuck it away for
> future use. So now that I've learned something today, can
> I go home?
>
>
> Jeremy Lakeman wrote:
> > I'll see your expression and raise you something even
> > more generic;
> > if(getrow() = min(getrow() for group 1), 1, 0)
> >
> > Jason 'Bug' Fenter [TeamSybase] wrote:
> >> if ( getrow () = 1 , 1 , if ( <column name> = <column
> name>[-1] , 0 , >> 1 ) )
> >>
> >>
> >> Of course, replace "<column name>" with the actual
> column name. >>
> >>
> >>


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-06-04 19:17:51.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
References: <48469ea9$1@forums-1-dub> <4846e724.628b.1681692777@sybase.com>
In-Reply-To: <4846e724.628b.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: <4846ea5f$1@forums-1-dub>
Date: 4 Jun 2008 12:17:51 -0700
X-Trace: forums-1-dub 1212607071 10.22.241.152 (4 Jun 2008 12:17:51 -0700)
X-Original-Trace: 4 Jun 2008 12:17:51 -0700, vip152.sybase.com
Lines: 36
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87072
Article PK: 416329

Regardless of the edit style / mask / datatype, you still have the
"Protect" property on the General tab. You can't toggle this property;
you *have* to use an expression.

cln wrote:
> If you can help me get it to work with an editable field you
> can and you can go with a HUGE box of chocolates (or red
> vines, my personal favorite). I sent an earlier post, the
> edit mask for DATE that I have on the field doesn't allow me
> the option to add a function to the 'Display Only' (protect)
> property. Any other ideas?
>
>> I'll see that bet and call. What if the OP isn't
>> suppressing repeating values on the column that's getting
>> grouped? ;)
>>
>>
>> However, I like that expression and will tuck it away for
>> future use. So now that I've learned something today, can
>> I go home?
>>
>>
>> Jeremy Lakeman wrote:
>>> I'll see your expression and raise you something even
>>> more generic;
>>> if(getrow() = min(getrow() for group 1), 1, 0)
>>>
>>> Jason 'Bug' Fenter [TeamSybase] wrote:
>>>> if ( getrow () = 1 , 1 , if ( <column name> = <column
>> name>[-1] , 0 , >> 1 ) )
>>>>
>>>> Of course, replace "<column name>" with the actual
>> column name. >>
>>>>


cln Posted on 2008-06-04 21:44:22.0Z
Sender: 679e.48470c1c.1804289383@sybase.com
From: cln
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48470cb6.67b9.1681692777@sybase.com>
References: <4846ea5f$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Jun 2008 14:44:22 -0700
X-Trace: forums-1-dub 1212615862 10.22.241.41 (4 Jun 2008 14:44:22 -0700)
X-Original-Trace: 4 Jun 2008 14:44:22 -0700, 10.22.241.41
Lines: 40
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87075
Article PK: 416332

Sorry - you're right of course, I just didn't have my
glasses on right I guess. Thanks for everything - this
works like a charm.

> Regardless of the edit style / mask / datatype, you still
> have the "Protect" property on the General tab. You can't
> toggle this property; you *have* to use an expression.
>
>
>
> cln wrote:
> > If you can help me get it to work with an editable field
> > you can and you can go with a HUGE box of chocolates (or
> > red vines, my personal favorite). I sent an earlier
> > post, the edit mask for DATE that I have on the field
> > doesn't allow me the option to add a function to the
> > 'Display Only' (protect) property. Any other ideas?
> >
> >> I'll see that bet and call. What if the OP isn't
> >> suppressing repeating values on the column that's
> getting >> grouped? ;)
> >>
> >>
> >> However, I like that expression and will tuck it away
> for >> future use. So now that I've learned something
> today, can >> I go home?
> >>
> >>
> >> Jeremy Lakeman wrote:
> >>> I'll see your expression and raise you something even
> >>> more generic;
> >>> if(getrow() = min(getrow() for group 1), 1, 0)
> >>>
> >>> Jason 'Bug' Fenter [TeamSybase] wrote:
> >>>> if ( getrow () = 1 , 1 , if ( <column name> =
> <column >> name>[-1] , 0 , >> 1 ) )
> >>>>
> >>>> Of course, replace "<column name>" with the actual
> >> column name. >>
> >>>>


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-06-04 19:19:44.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: getting a rownumber within a group
References: <48457c47$1@forums-1-dub> <4845999c.4126.1681692777@sybase.com> <4845a92e@forums-1-dub> <484697ef$1@forums-1-dub> <48469ea9$1@forums-1-dub>
In-Reply-To: <48469ea9$1@forums-1-dub>
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: <4846ead0$1@forums-1-dub>
Date: 4 Jun 2008 12:19:44 -0700
X-Trace: forums-1-dub 1212607184 10.22.241.152 (4 Jun 2008 12:19:44 -0700)
X-Original-Trace: 4 Jun 2008 12:19:44 -0700, vip152.sybase.com
Lines: 26
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87073
Article PK: 416331

Oh pooh. The OP *did* say that it was the first row of the group only.

Jason 'Bug' Fenter [TeamSybase] wrote:
> I'll see that bet and call. What if the OP isn't suppressing repeating
> values on the column that's getting grouped? ;)
>
>
> However, I like that expression and will tuck it away for future use. So
> now that I've learned something today, can I go home?
>
>
> Jeremy Lakeman wrote:
>> I'll see your expression and raise you something even more generic;
>>
>> if(getrow() = min(getrow() for group 1), 1, 0)
>>
>> Jason 'Bug' Fenter [TeamSybase] wrote:
>>> if ( getrow () = 1 , 1 , if ( <column name> = <column name>[-1] , 0
>>> , 1 ) )
>>>
>>>
>>> Of course, replace "<column name>" with the actual column name.
>>>
>>>
>>>