1. Falguni Patel
  2. PowerBuilder
  3. Saturday, 17 April 2021 09:41 AM UTC

I have created a data window which has a dropdown lit box for Gender. 

When a new record is added, the field shows display value to select from. However, when a window is retrieved, column shows data value instead of display value.

I did write below function in retrieveend event of datawindow. But it gives - "Invalid Arguments to Function" error. 

 

string ls_display

   ls_display = dw_sort.describe &
      ( "evaluate ( 'LookupDisplay ( dept_id )', " &
         + string ( dw_sort.GetRow() ) &
         + " )" )


Regards,
Falguni
Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 17 April 2021 14:27 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi,

Can you please describe the problem a bit more extensive? I'm not sure what "gender" would have to do with "dept_id".
What do you mean with "When a new record is added, the field shows display value to select from. However, when a window is retrieved, column shows data value instead of display value.". Are you saying that when inserting a new row the dropdown is populated correctly, but when you open the window and show an already inserted row, the dddw does not populate?

Maybe some images?

Also, personally I always struggle with the "Evaluate" function. What I usually do, is add a computed column to the datawindow itself, which then uses the LookupDisplay(), much easier to use. From you powerbuilder script you can then do a GetItem...() on that computed column.

regards

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.