1. jorge gonzalez
  2. PowerBuilder
  3. Sunday, 26 May 2024 18:16 PM UTC

I have a dropdownlist box column on a freeform DataWindow and want to get at the display value not the code value.

using ldwo.primary[row number] or datawindowname.getitemstring(row,colum) only get me the code.

 

I need the display value.

 

Thanks 

John Fauss Accepted Answer Pending Moderation
  1. Sunday, 26 May 2024 19:09 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Jorge -

Try using the LookUpDisplay() DataWindow expression function, inside of an Evaluate function, inside of a DataWindow Describe function, as follows:

String ls_display_value

ls_display_value = dw_1.Describe("Evaluate('LookUpDisplay(dept_id)',1)")

In the above code snippet, the column DWObject in the DataWindow that utilizes the Drop-down List Box (ddlb) edit style is named "dept_id". The row in the DataWindow that is to be evaluated is row 1, which is typical for free-form DataWindows.

Pay close attention to the use of apostrophes (single-quotes) and double-quotes, as the above statement requires you to code a string within a string.

Best regards, John

Comment
  1. jorge gonzalez
  2. Sunday, 26 May 2024 21:21 PM UTC
Thanks John. That worked.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.