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.

DropDownDataWindow change properties

2 posts in DataWindow Last posting was on 2009-11-13 07:58:32.0Z
aoikonom Posted on 2009-11-09 12:42:45.0Z
From: aoikonom <aoikonom@yahoo.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: DropDownDataWindow change properties
Date: Mon, 9 Nov 2009 04:42:45 -0800 (PST)
Organization: http://groups.google.com
Lines: 23
Message-ID: <fa77926e-b944-4396-ae3f-76a7d2b5fdea@b2g2000yqi.googlegroups.com>
NNTP-Posting-Host: 79.129.39.115
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1257770566 5648 127.0.0.1 (9 Nov 2009 12:42:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 9 Nov 2009 12:42:46 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: b2g2000yqi.googlegroups.com; posting-host=79.129.39.115; posting-account=oJZ-fAoAAACIUKyQOKrOvydZ3I8fdxZG
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 (.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!newsfeed.yul.equant.net!news-out.readnews.com!transit4.readnews.com!postnews.google.com!b2g2000yqi.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90230
Article PK: 409834

In a datawindow I have a column with a dropdown edit style.
Depending on another column I change dddw properties of this column
with the following code
Modify("<columnName>.dddw.name='<Datawindow name>'")
Modify("<columnName>.DDDW.DataColumn='<DataColumn>'")
Modify("<columnName>.DDDW.DisplayColumn='<DIsplayColumn>'")

My problem is that when the order of the columns in the 2 dropdown
datawindows is different,
then when I change the value in the dropDown it gives an error 'Item
does not pass validation test'.

For example if in the first datawindow the first column is a number
(dataColumn) and the second a string
(displayColumn) and in the second datawindow the first column is the
string and first the number, it does not work properly. If the order
is the same everything works fine. I expect that it should work as
long as I provide
the dataColumn and displayColumn with code.

I use PowerBuilder 10


Krishna Posted on 2009-11-13 07:58:32.0Z
From: Krishna <krishnagceb@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: DropDownDataWindow change properties
Date: Thu, 12 Nov 2009 23:58:32 -0800 (PST)
Organization: http://groups.google.com
Lines: 22
Message-ID: <7f72d77a-2e31-46d3-9a75-361bd5574c0e@h40g2000prf.googlegroups.com>
References: <fa77926e-b944-4396-ae3f-76a7d2b5fdea@b2g2000yqi.googlegroups.com>
NNTP-Posting-Host: 203.99.195.64
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1258099113 22102 127.0.0.1 (13 Nov 2009 07:58:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 13 Nov 2009 07:58:33 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h40g2000prf.googlegroups.com; posting-host=203.99.195.64; posting-account=EF9J0ggAAACXSpNuXlvbh_TAlnuMHfS8
User-Agent: G2/1.0
X-HTTP-Via: HTTP/1.0 ctsinnvlswcga[0AEF0607] (Websense-Content_Gateway/7.1.2 [uSc ]), HTTP/1.1 ctsintcoswgd[0AED7D54] (Websense-Content_Gateway/7.1.2 [uSc ])
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648),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!h40g2000prf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90270
Article PK: 409879

Hi,

The error you have mentioned here happens in two scenarios

1. The value set in the column exceeds the maximum permissible range.
For example, in an integer column, if you happen to enter a value more
than 32767 and tab out, this error occurs

2. The datatype of the value set in the column doesn't match the
permissible datatype. You can set a number in a string column but the
reverse is not possible

In your case, the data column is the value being set to the column in
your datawindow when you choose from the dropdown. So, if you have an
integer column in the front end of the datawindow, you can't map it
with a string column as the data column. However there is a way

In the query, cast all columns to string like this ---> select cast
(employee_id as integer)

The data column you choose in the dropdown should also be cast similar
to this