SetText displays the wrong value in dddw

Hi All,
We have a dropdown datawindow whose display value is "Part Num" (string) and 
whose data value is "Record ID" (long). After populating the values are...

Dispaly Vlaue        Data Value
3456                        1000
4100                        2987
5637A                     2400
6390-4                    4100

When we call SetText("4100" ) we expect it will select the second row, but 
it chooses the last row whose data value is 4100 and displays "6930-4" in 
the column. It is displaying the record whose data value matches the SetText 
argument. If we do a SetText for any of the other 3 records it works great, 
but if there is a record whose data value matches the argument to the 
SetText command, the text diaplayed in the column is wrong. We are currently 
using PB 11.01, but this has been a problem through all past version as 
well.

Is this a bug or are we doing something wrong.


0
Mike
12/31/2010 3:17:01 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

4 Replies
1080 Views

Similar Articles

[PageSpeed] 24

Hi Mike;

  The DW is behaving correctly as the SetText ( ) command is placing the 
data into the keyboard buffer and to the DDDW that is the same thing as the 
user inputting the value through the keyboard. If you would like the DDDW to 
select the display value "6390-4" you need to the set the parent DW's column 
to "4100" via the SetItem ( ) method.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Mike Marston"  wrote in message news:4d1df3ed$1@forums-1-dub...

Hi All,
We have a dropdown datawindow whose display value is "Part Num" (string) and
whose data value is "Record ID" (long). After populating the values are...

Dispaly Vlaue        Data Value
3456                        1000
4100                        2987
5637A                     2400
6390-4                    4100

When we call SetText("4100" ) we expect it will select the second row, but
it chooses the last row whose data value is 4100 and displays "6930-4" in
the column. It is displaying the record whose data value matches the SetText
argument. If we do a SetText for any of the other 3 records it works great,
but if there is a record whose data value matches the argument to the
SetText command, the text diaplayed in the column is wrong. We are currently
using PB 11.01, but this has been a problem through all past version as
well.

Is this a bug or are we doing something wrong.

0
Chris
1/3/2011 1:55:08 AM
Chris,
Thanks for the quick response. I should have explained a little better. The 
SetText("4100") is being done on the parent datawindow column. The hope is 
that this will select the record from the dddw where the display value is 
"4100". Instead it selects the record from the dddw where the data value is 
"4100" (dispaly value "6390-4").

If we do a SetText("3456") on the parent datawindow column it chooses the 
record from the dddw where the diaplay value is "3456", which is correct. 
The only time it chooses the wrong record from the dddw is if there is a 
record whose data value matches the SetText() value.

We actually encounter this probelm using the pfc_n_cst_dwsrv_dropdownsearch 
objet. The problem is in the EditChanged evnet of this object. I was able to 
find an old thread about the problem in the newsgroup, but there was no 
resolution posted.

I appreciate your help.
TIA,
Mike
"Chris Pollach" <cpollach@travel-net.com> wrote in message 
news:4d212c7c$1@forums-1-dub...
> Hi Mike;
>
>  The DW is behaving correctly as the SetText ( ) command is placing the 
> data into the keyboard buffer and to the DDDW that is the same thing as 
> the user inputting the value through the keyboard. If you would like the 
> DDDW to select the display value "6390-4" you need to the set the parent 
> DW's column to "4100" via the SetItem ( ) method.
>
> HTH
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "Mike Marston"  wrote in message news:4d1df3ed$1@forums-1-dub...
>
> Hi All,
> We have a dropdown datawindow whose display value is "Part Num" (string) 
> and
> whose data value is "Record ID" (long). After populating the values are...
>
> Dispaly Vlaue        Data Value
> 3456                        1000
> 4100                        2987
> 5637A                     2400
> 6390-4                    4100
>
> When we call SetText("4100" ) we expect it will select the second row, but
> it chooses the last row whose data value is 4100 and displays "6930-4" in
> the column. It is displaying the record whose data value matches the 
> SetText
> argument. If we do a SetText for any of the other 3 records it works 
> great,
> but if there is a record whose data value matches the argument to the
> SetText command, the text diaplayed in the column is wrong. We are 
> currently
> using PB 11.01, but this has been a problem through all past version as
> well.
>
> Is this a bug or are we doing something wrong.
> 


0
Mike
1/3/2011 2:38:54 PM
Is SetText() what you want to do here anyway?  Remember that this is just 
setting the value into the "edit control" that hovers above the actual 
datawindow column.  The data you've sent won't be in the dw buffer until you 
a) tab out of the column; or b) call dw.AcceptText().

Does the problem exist if you use SetItem() instead?

Paul Horan[Sybase]
http://paulhoran.ulitzer.com

"Mike Marston" <mikem@ksitech.com> wrote in message 
news:4d21df7e$1@forums-1-dub...
> Chris,
> Thanks for the quick response. I should have explained a little better. 
> The SetText("4100") is being done on the parent datawindow column. The 
> hope is that this will select the record from the dddw where the display 
> value is "4100". Instead it selects the record from the dddw where the 
> data value is "4100" (dispaly value "6390-4").
>
> If we do a SetText("3456") on the parent datawindow column it chooses the 
> record from the dddw where the diaplay value is "3456", which is correct. 
> The only time it chooses the wrong record from the dddw is if there is a 
> record whose data value matches the SetText() value.
>
> We actually encounter this probelm using the 
> pfc_n_cst_dwsrv_dropdownsearch objet. The problem is in the EditChanged 
> evnet of this object. I was able to find an old thread about the problem 
> in the newsgroup, but there was no resolution posted.
>
> I appreciate your help.
> TIA,
> Mike
> "Chris Pollach" <cpollach@travel-net.com> wrote in message 
> news:4d212c7c$1@forums-1-dub...
>> Hi Mike;
>>
>>  The DW is behaving correctly as the SetText ( ) command is placing the 
>> data into the keyboard buffer and to the DDDW that is the same thing as 
>> the user inputting the value through the keyboard. If you would like the 
>> DDDW to select the display value "6390-4" you need to the set the parent 
>> DW's column to "4100" via the SetItem ( ) method.
>>
>> HTH
>>
>> Regards ... Chris
>> President: OSUG / STD Inc.
>> Blog: http://chrispollach.blogspot.com
>> PBDJ: http://chrispollach.sys-con.com
>> SourceForge: http://sourceforge.net/projects/stdfndclass
>>
>> "Mike Marston"  wrote in message news:4d1df3ed$1@forums-1-dub...
>>
>> Hi All,
>> We have a dropdown datawindow whose display value is "Part Num" (string) 
>> and
>> whose data value is "Record ID" (long). After populating the values 
>> are...
>>
>> Dispaly Vlaue        Data Value
>> 3456                        1000
>> 4100                        2987
>> 5637A                     2400
>> 6390-4                    4100
>>
>> When we call SetText("4100" ) we expect it will select the second row, 
>> but
>> it chooses the last row whose data value is 4100 and displays "6930-4" in
>> the column. It is displaying the record whose data value matches the 
>> SetText
>> argument. If we do a SetText for any of the other 3 records it works 
>> great,
>> but if there is a record whose data value matches the argument to the
>> SetText command, the text diaplayed in the column is wrong. We are 
>> currently
>> using PB 11.01, but this has been a problem through all past version as
>> well.
>>
>> Is this a bug or are we doing something wrong.
>>
>
> 


0
Paul
1/3/2011 8:07:41 PM
The dddw always matches on the data value. If you want to select by 
display value, you'll have to use GetChild, do a Find to find the row in 
the dddw with the display value and then getitem the data value. Then 
put that into the main dw.

On 1/3/2011 9:38 AM, Mike Marston wrote:
> Chris,
> Thanks for the quick response. I should have explained a little better. The
> SetText("4100") is being done on the parent datawindow column. The hope is
> that this will select the record from the dddw where the display value is
> "4100". Instead it selects the record from the dddw where the data value is
> "4100" (dispaly value "6390-4").
>
> If we do a SetText("3456") on the parent datawindow column it chooses the
> record from the dddw where the diaplay value is "3456", which is correct.
> The only time it chooses the wrong record from the dddw is if there is a
> record whose data value matches the SetText() value.
>
> We actually encounter this probelm using the pfc_n_cst_dwsrv_dropdownsearch
> objet. The problem is in the EditChanged evnet of this object. I was able to
> find an old thread about the problem in the newsgroup, but there was no
> resolution posted.
>
> I appreciate your help.
> TIA,
> Mike
> "Chris Pollach"<cpollach@travel-net.com>  wrote in message
> news:4d212c7c$1@forums-1-dub...
>> Hi Mike;
>>
>>   The DW is behaving correctly as the SetText ( ) command is placing the
>> data into the keyboard buffer and to the DDDW that is the same thing as
>> the user inputting the value through the keyboard. If you would like the
>> DDDW to select the display value "6390-4" you need to the set the parent
>> DW's column to "4100" via the SetItem ( ) method.
>>
>> HTH
>>
>> Regards ... Chris
>> President: OSUG / STD Inc.
>> Blog: http://chrispollach.blogspot.com
>> PBDJ: http://chrispollach.sys-con.com
>> SourceForge: http://sourceforge.net/projects/stdfndclass
>>
>> "Mike Marston"  wrote in message news:4d1df3ed$1@forums-1-dub...
>>
>> Hi All,
>> We have a dropdown datawindow whose display value is "Part Num" (string)
>> and
>> whose data value is "Record ID" (long). After populating the values are...
>>
>> Dispaly Vlaue        Data Value
>> 3456                        1000
>> 4100                        2987
>> 5637A                     2400
>> 6390-4                    4100
>>
>> When we call SetText("4100" ) we expect it will select the second row, but
>> it chooses the last row whose data value is 4100 and displays "6930-4" in
>> the column. It is displaying the record whose data value matches the
>> SetText
>> argument. If we do a SetText for any of the other 3 records it works
>> great,
>> but if there is a record whose data value matches the argument to the
>> SetText command, the text diaplayed in the column is wrong. We are
>> currently
>> using PB 11.01, but this has been a problem through all past version as
>> well.
>>
>> Is this a bug or are we doing something wrong.
>>
>
0
Roland
1/3/2011 9:04:29 PM
Reply:

Similar Artilces:

wrong dddw value displayed in column (previous value displayed)
Under NT4.0 pb7.03 when a dddw row is selected and one tabs off the column it is highlighted with the previous value displayed even though the selected value has been accepted. TIA Sidney Holder Clientsolve inc. ...

Column With dddw displays data value insead of display value
Hello, I'm using power builder v8.0.3 and have a column that displays using a drop down datawindow. Based on the users permission level and item selected, the drop down (via dwc) is filtered or unfiltered. When the user goes from a record where the drop down is filtered and they have edit rights on column (which does show the correct display value) to one where the drop down is unfiltered and they can not edit the column (protect = 1), the column displays the data value. I did take off the protection and confirmed the correct number of rows are in the drop down. This seems...

composite datawindow dddw display value
I have a composite datawindow with multiple "reports" on it. I do a getchild to get a handle to the report. Then a getchild to get a handle to the dddw winthin the report. The dddw retrieve rowcount is fine. When the composite displays I'm not seeing the "display" value on the dddw but instead the "data" value. I tried setting PBDataWindowEnableDDDW to true but it didn't make a difference. The composite looks fine when I do a retrieval in the dw painter. Am I missing something? ...

Update datawindow with dddw display value
I have freeform datawindow with dddw edit style on column 'columnname', that use Display Column 'A' and Data Column 'B' values, retrieved from picklist table. I want to update datawindow column with display value from dddw. string ls_displayvalue DataWindowChild ldwc IF dwo.name = 'columnname' THEN this.GetChild('columname',ldwc) ls_displayvalue = ldwc.GetItemString(ldwc.GetRow(),'A') this.SetItem(1,'columnname',ls_dislpayvalue) END IF If right after that I check with GetItemString() contents of 'columnname',...

Q: Sort datawindow by display value from dddw
Hi All! Is there way to do that? Thank You! Use LookUpDisplay(column) when defining your sort order. HTH, Sam Tai On Fri, 20 Aug 1999 18:33:12 +0300, in powersoft.public.powerbuilder.datawindow Zip <zip@id.ru> wrote: >Hi All! > >Is there way to do that? >Thank You! > > > ...

Drop Down datawindows displaying the display value corresponding to a 0 data value when the field is NULL.
Most of our query windows have drop down datawindows populated with code values taken from the database. Some of these code values have a primary key and thus a data value in the drop down of zero. With the new patches when a column on the datawindow is set to null the display value corresponding to the 0 data value in the drop down datawindow is displayed. When the user tabs into the field to edit it though the display is set back to null. If the user goes ok it's blank like it should be and tabs out again the display value corresponding to the 0 data value is displayed again!!...

passing display column value of dddw from window to datawindow.
I would pass the display value (not the data value) of a drop down datawindow from the window where it is being used into a datawindow. I want to use the selected value in the header of the report being generated. Thanks, _Greg LookUpDisplay combined with Describe and Evaluate Greg Hazzard wrote in message ... >I would pass the display value (not the data value) of a drop down >datawindow from the window where it is being used into a datawindow. I want >to use the selected value in the header of the report being generated. > >Thanks, >_Greg > > ...

dddw display value doesn't until datawindow is scrolled
Using: PB6.5, DB2 I'm working on a single-table maintenance window and the datawindow has a dropdowndatawindow edit style defined for one of the columns. The dropdatawindow is an external datawindow; it gets populated with display values after calling a function which does the following: 1) Calls GetChild() to get a reference to the column with the dropdowndatawindow edit style, 2) Calls a shared object function that returns an instance nvo with the records to populate the dddw stored as a blob, 3) Calls SetFullState() to populate a local datastore object, 4) Loops through th...

Can not display the display value in dddw
Hi! I wanted to add a row '[None]' in a dddw ( which is based on a SQL) I don't want to add a value in my view. I am using the following code to add the row. ll_rc = adwc_obj.retrieve(dw_ra.GetItemString(1, "customer_id") ls_display = dw_sr.Describe( as_colname + ".dddw.DisplayColumn" ) ls_data = dw_sr.Describe( as_colname + ".dddw.DataColumn" ) SetNull( li_null ) adwc_obj.InsertRow(1) adwc_obj.SetItem( 1, ls_data, null ) adwc_obj.SetItem( 1, ls_display, "[None]" ) return ll_rc But in the dddw list the top row sho...

Retaining DDDW Display Values When DDDW COntents Change
I'm new to Power Builder. I'm facing a problem when I create 2 dddw. When one of them change, it should change the content of the other one. They are link with ID but display in description. Now it comes up with a problem that when focus changed, the display of the second dddw will be jump to ID instead of description. What did I miss?? Take the following scenerio. You have states and in those states you have certain counties. You have DDDW's for both of them. If the state is changed then the counties need to change as well. Once the state is changed then you hav...

Showing Display value when DDDW is retrieved after value is set
Does anyone know a way to get a DDDW to show the Display Value, when the DDDW list is retrieved after the value is set? I could do a GetItem/SetItem to re-set the value, then I'd have to set the ItemStatus to NotModified. Anyone know a better way? ...

DDDW code value is displayed when selecting instead of display
When selecting a dddw column the code value is displayed instead of the display value. Apart from that the dddw works ok. But it is quite annoying, especially when the user decides not to change the value, and the code is left in the column. Any ideas? TIA Aggelos -- ________________________________ Aggelos Paraskevopoulos Senior Partner CENTENTIA SA 100, Alexandras Av. 114 72 Athens, HELLAS (GREECE) Web: http://www.cententia.com Phone: +30-1-6464552 Fax: +30-1-6467808 Mobile: +30-946060639 ________________________________ Is the DDDW editable? Are you sure t...

DDDW Combo returns display value instead of data value
I have a DDDW Combo box. I select an item in the dddw. Then I do a GetItemString() and the data value (a code) is gotten. The next time I do a GetItemString(), it seems the display value is gotten. If I type a value into the dddw, and that value is a valid item in the dddw, I still get the display value and not the data value. How can I get it to always return the data value if the display is value is valid in the dddw (and it always will be, but please don't tell me to not make it combo, because the list is long and the requirements people say this is how is must be) Am I making sense? I am using PB 5.004 Thanks, Karen ...

Need help in making the display value of dddw to be display only after saving.
I have a field with editstyle dropdowndatawindow. Once the record is saved I don't want user to change the data in dropdown i.e. I want the dropdown to behave as display only. I am using this : dw_1.modify("column_1.edit.displayonly=Yes"). This is making the field to be displayonly (and I am getting the displayvalue for the field .. I am using Describe(evaluate (lookupdisplay...)) but once I tabbed out off the column I am only getting the datavalue not the displayvalue. I wanted user to be able to tab to the field but should not be able to make any changes. Any help is ...

Help! DDDW not showing display value
Hello. I use PowerBuilder 8.0.3 (9704). I have a problem that's THIS close to driving me crazy... Every now and again, a dropdown datawindow stops behaving like it should. The dd is based on a table with 4 rows - numeric primary key and a name field, describing the contents. The DDDW has the primary key as data value, and the name field is the display value. Suddenly, out of the blue - the data value starts showing instead of the display value. I finally managed to get it right again after jogging the display and data properties a bit (changing which fields should be us...

DDDW Display Value
How can I retrieve a DDDW display value into a variable? I have a PB 6.5 form that uses external data, and a function that reads data from a dw and populates the form. A couple of the columns in the dw use DDDW, and I would like the form to print the display column, not the data column. Surely this is possible, but I haven't found anything yet that will work. Any suggestions? Thanks carl Try this function: LookUpDisplay() HTH, Rao Arimilli Check out the LookUpDisplay ( ) datawindow function. In script, you will need to use the Describe( "Evaluate ( ...

Display value from DDDW
Hi, I have dropdown datawindow that has attached in a column. By using the GetitemString I am able to take only the DATA value from the Dropdown. Is there anyway that I can take the DISPLAY value also from the Dropdowndatawindow. Any hint will be appreciated. Thanks Krthik You can use the Evaluate datawindow function with the LookupDisplay expression to get the display value. e.g. dw_1.Describe( "Evaluate( 'LookUpDisplay( column_1 )', 1 )" ) could get the display value for column_1 from the first row. "Karthik" <kpanc@labo...

Display value of DDDW
Hi, I have d_emp_details with department field which is dddw ,datavalue is department code and displayvalue is department description(values 10-20 with different description). User opens dddw , chooses department and changes focus from the field. If user chooses departments 10-15 I need to change display value of department field to be the same ,but keep real values in dddw( list of departments).So if user opens dddw, he will see real values. I tried to create computed field with same decription for 10-15 departments and put it as displayvalue , but if user changes from 10 to 11...

Display value of a DDDW
Hi, How do I get the display value (not the column itself) of a drop down datawindow? Cheers...Biju Describe (Evaluate(LookUpDisplay, col),row) Biju Nair wrote in message ... >Hi, > >How do I get the display value (not the column itself) of a drop down >datawindow? > >Cheers...Biju > > > > LookupDisplay -- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel 01904 481999 Fax 01904 481666 Visit us at www.getrealsystems.com Specialists in e-Procurement and supply chain technology ...

Display Values of DDDW
How do I get the display values (text) of a dddw to save in a file using saveas instead of the data values? Any help will be appreciated. LookUpDisplay() -- Paul Horan[Sybase] paulhoran.pbdjmagazine.com <Jon> wrote in message news:49b6911c.ca2.1681692777@sybase.com... > How do I get the display values (text) of a dddw to save in > a file using saveas instead of the data values? > > Any help will be appreciated. How are you doing that? I tried it and it would not work. below is a snapshot. I still got the data value instead of the text that is being...

Call GetItemXxx on the DDDW column for one DW, it returns display value instead of data value
Hi All, I have one DW which has a column whose Edit Style is DDDW. When I try to do a duplication search in the DW for this column, I use GetItemXxx on this column for each row. What I expected is to get the data value of this column. However, it returns display value of it? Can anybody help me out? Thanks. > Hi All, > > I have one DW which has a column whose Edit Style is DDDW. > > When I try to do a duplication search in the DW for this > column, I use GetItemXxx on this column for each row. > What I expected is to get the data value of this col...

Display Value of a Column DDDW
Hi all How can I get the display value of a column DDDW of any row (also the current row) ? TIA John John -- Use the describe method and the evaluate function. Something like this: ll_row = 1 ls_DisplayValue = d1_1.Describe ( "Evaluate ( 'LookupDisplay ( dddw_column ) ' , " + String ( ll_Row ) + ')' ) HTH Ron Gallagher, CPDP Atlanta, GA rongallagher@mindspring.com John PT wrote in message ... >Hi all > >How can I get the display value of a column DDDW of any row (also the current >row) ? > >TIA >John Desc...

Get display value for DDDW?
Hi, I need to get the display value in a DDDW column. I couldn't find a function for it. Could anyone help me out? Thanks for answering, Christie Use the LookupDisplay function either in dw painter or combined with the Evaluate function in PowerScript. Anil "San Rong Corp." wrote: > Hi, > > I need to get the display value in a DDDW column. > I couldn't find a function for it. Could anyone help me > out? > > Thanks for answering, > Christie ...

getting display values from DDDW
Hi, Using PB5.0 / PFC There is a bug which I wanted to convert to a feature :) In linked DWs is the Argument column in the master is a DDDW then pfc picks up the Display value instead of taking the data value. To use this to get the display value of DDDWs instead of going the usual way of datawindowchild - I tried to track down how PFC gets values. I may be wrong but apparently the answer lay in of_getitem( ) So i tried to use string ls_val = of_getitem( row, "data_column" ) but I get function not defined I tried of_setbase( true ) this.inv_base.of_...

Web resources about - SetText displays the wrong value in dddw - sybase.powerbuilder.datawindow

Comparison of display technology - Wikipedia, the free encyclopedia
CRTs use an electron beam, scanning the display, flashing a lit image. If interlacing is used, a single full-resolution image results in two ...

Target store displays video games in cigarette-style plain packaging
South Australian Target believes it is acting in accordance with state rules on R18+ video games, and the weirdest part is it might be right. ...

How the Samsung Galaxy S7 Edge pulls off its curved display
... “variants” or “models” of the same smartphone can be a bit misleading. The technology that goes into making the S7 Edge’s curved display is ...

Dealmaster: Get a Dell Inspiron 15 7000 laptop with a 4K IPS display for just $650
... One of our featured deals drastically cuts the price of a 4K laptop: you can get a Dell Inspiron 15 7000 notebook, complete with 4K IPS display, ...

Universal Display: Gabelli Upbeat on OLED Production Outlook
Gabelli & Co .’s Hendi Susanto today reiterates a Buy rating on shares of organic light-emitting diode technology maker Universal Display ( OLED ...

Israel-U.S. tension on display as Netanyahu nixes visit
White House said it was "surprised" to learn via media that Israeli leader wasn't coming in March, but the Israel says it doesn't know why

Trump displays steak, water, wine to defend business record
After winning the day's two biggest prizes in the Republican race for president, Donald Trump was in the mood to celebrate.

New NES emulator displays classic games in 3D
3DNES, a new web-based emulator for the Nintendo Entertainment System that displays games as if they were made in 3D, has been publicly released ...

CPT, HannStar Display sees decreased February revenues
TFT-LCD panel makers Chunghwa Picture Tubes (CPT) and HannStar Display have reported February consolidated revenues of NT$2.796 billion (US$83.7 ...

Watch Keanu Reeves Display Impressive Action Skills at a Gun Range for 'John Wick: Chapter Two'
Watch Keanu Reeves Display Impressive Action Skills at a Gun Range for 'John Wick: Chapter Two'

Resources last updated: 3/11/2016 4:38:29 PM