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.

expression on checkbox data value

3 posts in DataWindow Last posting was on 2008-10-17 20:45:17.0Z
Martin Posted on 2008-10-17 09:11:04.0Z
From: "Martin" <m.kaltenboeck@utanet.at>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: expression on checkbox data value
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48f856a8$1@forums-1-dub>
Date: 17 Oct 2008 02:11:04 -0700
X-Trace: forums-1-dub 1224234664 10.22.241.152 (17 Oct 2008 02:11:04 -0700)
X-Original-Trace: 17 Oct 2008 02:11:04 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87993
Article PK: 417249

using PB 10.5.2

I have a column that can hold three values: 'F', 'E', 'O'

in a datawindow I want to display the column as a checkbox,
checked if the value is 'F' or 'E' and unchecke if the value is 'O'

so how can I set the data value for the ON-property
I can't say 'F' or 'E' and I can't use an expression!

I know that actually the field-type 'checkbox' ist not very correct at this,
and I should use a dddw style fieldl,
but in this specific case it would make sense

thanks for help


fisher Posted on 2008-10-17 09:30:45.0Z
From: "fisher" <fisherNOatwckp.SPAM.lodz.PLEASE.pl>
Newsgroups: sybase.public.powerbuilder.datawindow
Organization: 193.121.160.69
References: <48f856a8$1@forums-1-dub>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: expression on checkbox data value
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48f85b45$1@forums-1-dub>
Date: 17 Oct 2008 02:30:45 -0700
X-Trace: forums-1-dub 1224235845 10.22.241.152 (17 Oct 2008 02:30:45 -0700)
X-Original-Trace: 17 Oct 2008 02:30:45 -0700, vip152.sybase.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87994
Article PK: 417250

Hi,
Your description makes this field for presentation only so ....

IN your sql (I presume this is a source of data) use something like
decode( column ,'O', 'O', 'F')
or decode(column, 'F','E', column)
in first case only 'O' value is kept all others are replaced with F
second If value is 'F' then it gets replaced with 'E'

Those are examples of Oracle decode, but you can use case or any other DB (you
did not mention the one you're using).

Basically it's about pushing this matching to source of your data.

good luck
On 17 Oct 2008 02:11:04 -0700,
in sybase.public.powerbuilder.datawindow

Martin <m.kaltenboeck@utanet.at> wrote:
>using PB 10.5.2
>
>I have a column that can hold three values: 'F', 'E', 'O'
>
>in a datawindow I want to display the column as a checkbox,
>checked if the value is 'F' or 'E' and unchecke if the value is 'O'
>
>so how can I set the data value for the ON-property
>I can't say 'F' or 'E' and I can't use an expression!
>
>I know that actually the field-type 'checkbox' ist not very correct at this,
>and I should use a dddw style fieldl,
>but in this specific case it would make sense
>
>thanks for help
>
>


Paul Horan[Sybase] Posted on 2008-10-17 20:45:17.0Z
From: "Paul Horan[Sybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48f856a8$1@forums-1-dub>
Subject: Re: expression on checkbox data value
Lines: 29
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: <48f8f95d@forums-1-dub>
Date: 17 Oct 2008 13:45:17 -0700
X-Trace: forums-1-dub 1224276317 10.22.241.152 (17 Oct 2008 13:45:17 -0700)
X-Original-Trace: 17 Oct 2008 13:45:17 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87997
Article PK: 417254

A checkbox is capable of holding one of two values (or three, if you
consider 3-state). So you could assign F to checked, E to unchecked, and O
to "third state", but you can't do what you want and have two separate
values meaning the same state.

You're using the wrong visual metaphor, IMO. I'd use a radiobutton.

Paul Horan[Sybase]

"Martin" <m.kaltenboeck@utanet.at> wrote in message
news:48f856a8$1@forums-1-dub...
> using PB 10.5.2
>
> I have a column that can hold three values: 'F', 'E', 'O'
>
> in a datawindow I want to display the column as a checkbox,
> checked if the value is 'F' or 'E' and unchecke if the value is 'O'
>
> so how can I set the data value for the ON-property
> I can't say 'F' or 'E' and I can't use an expression!
>
> I know that actually the field-type 'checkbox' ist not very correct at
> this, and I should use a dddw style fieldl,
> but in this specific case it would make sense
>
> thanks for help
>