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.

How to highlight a specific field

4 posts in DataWindow Last posting was on 2009-09-24 16:03:58.0Z
WaldoNJ Posted on 2009-09-23 14:23:43.0Z
From: waldonj <bob@boblandau.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: How to highlight a specific field
Date: Wed, 23 Sep 2009 07:23:43 -0700 (PDT)
Organization: http://groups.google.com
Lines: 16
Message-ID: <f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com>
NNTP-Posting-Host: 68.25.40.219
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1253715824 13293 127.0.0.1 (23 Sep 2009 14:23:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 23 Sep 2009 14:23:44 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m20g2000vbp.googlegroups.com; posting-host=68.25.40.219; posting-account=nkovXAoAAAAiIgB_TAvX0vc3f1n4XtCd
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!m20g2000vbp.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89987
Article PK: 419175

Is there a technique to highlight a specific field - meaning a
specific intersection of row and column - when a change is made by a
user to the contents of that field. I understand how to determine if
a row is modified in a datawindow expression, but I only want to
highlight the specific field that was changes, not the entire row. I
understand how to determine which column was changed in the
itemchanged event, but I don't want to highlight the entire column in
the datawindow. How can I synthesize this information such that I can
specifically highlight the field that was changed?

Example: a datawindow with several columns including one called
"price", displays 25 rows. User changes the price on an item in row 7
from $1.00 to $1.25. How do I either in a datawindow expression, or
in Powerscript, specifically highlight the $1.25 that was typed (in
any manner, font color, bold, italics, whatever) so that I do not
highlight the entrie column or the entire row?


Scott Morris Posted on 2009-09-23 14:42:40.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com>
Subject: Re: How to highlight a specific field
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4aba33e0$1@forums-1-dub>
Date: 23 Sep 2009 07:42:40 -0700
X-Trace: forums-1-dub 1253716960 10.22.241.152 (23 Sep 2009 07:42:40 -0700)
X-Original-Trace: 23 Sep 2009 07:42:40 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89988
Article PK: 419176


"waldonj" <bob@boblandau.com> wrote in message
news:f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com...
> Is there a technique to highlight a specific field - meaning a
> specific intersection of row and column - when a change is made by a
> user to the contents of that field. I understand how to determine if
> a row is modified in a datawindow expression, but I only want to
> highlight the specific field that was changes, not the entire row. I
> understand how to determine which column was changed in the
> itemchanged event, but I don't want to highlight the entire column in
> the datawindow. How can I synthesize this information such that I can
> specifically highlight the field that was changed?
>
> Example: a datawindow with several columns including one called
> "price", displays 25 rows. User changes the price on an item in row 7
> from $1.00 to $1.25. How do I either in a datawindow expression, or
> in Powerscript, specifically highlight the $1.25 that was typed (in
> any manner, font color, bold, italics, whatever) so that I do not
> highlight the entrie column or the entire row?

Use an expression similar to " if (price.original = value, 0, 1 ) " to
change whatever visual indicators you want.


WaldoNJ Posted on 2009-09-24 15:32:05.0Z
From: waldonj <bob@boblandau.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: How to highlight a specific field
Date: Thu, 24 Sep 2009 08:32:05 -0700 (PDT)
Organization: http://groups.google.com
Lines: 41
Message-ID: <60d9a9c3-4f04-4ed6-9ec3-2161c10df853@y20g2000vbk.googlegroups.com>
References: <f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com> <4aba33e0$1@forums-1-dub>
NNTP-Posting-Host: 68.25.40.219
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1253806325 13515 127.0.0.1 (24 Sep 2009 15:32:05 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 24 Sep 2009 15:32:05 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: y20g2000vbk.googlegroups.com; posting-host=68.25.40.219; posting-account=nkovXAoAAAAiIgB_TAvX0vc3f1n4XtCd
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!y20g2000vbk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89999
Article PK: 419187


On Sep 23, 10:42 am, "Scott Morris" <bo...@bogus.com> wrote:
> "waldonj" <b...@boblandau.com> wrote in message
>
> news:f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com...
>
>
>
> > Is there a technique to highlight a specific field - meaning a
> > specific intersection of row and column - when a change is made by a
> > user to the contents of that field.  I understand how to determine if
> > a row is modified in a datawindow expression, but I only want to
> > highlight the specific field that was changes, not the entire row.  I
> > understand how to determine which column was changed in the
> > itemchanged event, but I don't want to highlight the entire column in
> > the datawindow.  How can I synthesize this information such that I can
> > specifically highlight the field that was changed?
>
> > Example:  a datawindow with several columns including one called
> > "price", displays 25 rows.  User changes the price on an item in row 7
> > from $1.00 to $1.25.  How do I either in a datawindow expression, or
> > in Powerscript, specifically highlight the $1.25 that was typed (in
> > any manner, font color, bold, italics, whatever) so that I do not
> > highlight the entrie column or the entire row?
>
> Use an expression similar to " if  (price.original = value, 0, 1 ) " to
> change whatever visual indicators you want.

Can you clarify the actual datawindow expression for a generic
approach, that is, I do not necessarily know the original value.
Using the example and your suggestion, I tried

if(price.original = price,0,1)

and

if(price.original = dec(gettext()),0,1)

in the expression for Bold. Neither worked.


Scott Morris Posted on 2009-09-24 16:03:58.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <f01aec2e-27a4-4554-9365-b6d0969fe8b6@m20g2000vbp.googlegroups.com> <4aba33e0$1@forums-1-dub> <60d9a9c3-4f04-4ed6-9ec3-2161c10df853@y20g2000vbk.googlegroups.com>
Subject: Re: How to highlight a specific field
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
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: <4abb986e$1@forums-1-dub>
Date: 24 Sep 2009 09:03:58 -0700
X-Trace: forums-1-dub 1253808238 10.22.241.152 (24 Sep 2009 09:03:58 -0700)
X-Original-Trace: 24 Sep 2009 09:03:58 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90000
Article PK: 419188

> if(price.original = price,0,1)

This is the one you need. The values used are wrong.

> and
> if(price.original = dec(gettext()),0,1)
> in the expression for Bold. Neither worked.

I thought about mentioning the idiosyncracy with bold; now it's a teachable
moment. The bold attribute is not actually a boolean value. It corresponds
to a font's weight. Use the datawindow syntax utility (File > New > Tool
(tab) > Datawindow Syntax) to see the values that are expected for this
attribute (as well as any others that may interest you). A very useful
utility that will save you lots of time. Another way of determining the
correct syntax is to simply set the attribute to the desired value and look
at the datawindow source. Be aware that you may need to adjust the
expression to handle NULL values correctly, as well as new rows (that will
be inserted into the DB - I only deal with updates to retrieved rows).