1. Ganesan Rajan
  2. PowerBuilder
  3. Thursday, 15 October 2020 09:19 AM UTC

Dear Experts,

I am facing a weird problem in drop down list box values in Powerbuilder 2017 R3 Build 1880.

Our application gets the list of printers installed in a machine and lists it in a dropdown list box.

A variable is used to collect data values and display values as below.

Each data,display value combination is separated by forward slash.

As the values are dynamic, both data values and display values are same.

ls_values = No Printer Allocated No Printer Allocated/ \\ipp://keprp02.kjog.org.in\SU-PR566695-Product-Test \\ipp://keprp02.kjog.org.in\SU-PR566695-Product-Test

the code below sets the values to DDLB

DW_Main.Object.reg_printer.values = ls_values 

In front end, DDLB shows value as below

No Printer Allocated

\\ipp:/keprp02.kjog.org.in\SU-PR566695-Product-Test

In the second value, one forward slash is missing after the colon i.e for both Data and Display Values

Can you please let me know why this is happening?

Thanks a ton.

Ganesan R

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 11:04 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Ganesan,

the slash is a separator between multiple pairs of desplay and actual values. 

If you want to have a slash in one of the values you have to write a double slash. 

In your case: You want two slashes.

So change

\\ipp://keprp02.kjog.org.in\SU-PR566695-Product-Test \\ipp://keprp02.kjog.org.in\SU-PR566695-Product-Test

to 

\\ipp:////keprp02.kjog.org.in\SU-PR566695-Product-Test \\ipp:////keprp02.kjog.org.in\SU-PR566695-Product-Test

 

Alternative: SetValue function

HTH,

René

Comment
There are no comments made yet.
Ganesan Rajan Accepted Answer Pending Moderation
  1. Thursday, 15 October 2020 12:32 PM UTC
  2. PowerBuilder
  3. # 1

Thanks a lot Rene. The answer really helps.

 

Ganesan R

Comment
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.
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.