Page 1 of 1

Dropdown Box

Posted: Sat Aug 29, 2015 9:35 pm
by sburden77
Hello,
I'm writing a program that displays our open orders.

I'm dynamically populating my choices using RPG. There will always be five options to choose from in the dropdown box. The five options for the next 3 weeks will be:
  • Sep 2015 Orders
  • Oct 2015 Orders
  • Nov 2015 Orders
  • Dec 2015 Orders
  • Jan 2016 Orders
The above five options is showing in my dropdown but, there's a blank at the top. I set the blank option property to "false" but the blank is still showing.

By default all of our open orders display in a subfile and that works fine. Now, I'm adding a dropdown for the user to select the production month of their choosing.

When the user select "Sep 2015 Orders" I need to pass "201509" back to my program so I can get the from and to date range from a table because we don't use calendar month for exact date range.

I appreciate any advice you can give.

Best regards

Re: Dropdown Box

Posted: Mon Aug 31, 2015 4:33 am
by dieter
Hello,
maybe you didn't set a correct initial value for you drop down box? I think you drop down box will return values like 201509, 201510, ...
Then you should take care that the initial value (the value before a user selects something) should not be 0.

Dieter

Re: Dropdown Box

Posted: Mon Aug 31, 2015 9:56 am
by Scott Klement
I agree with Dieter. What comes up as the selected element when the page is rendered is whatever value is in the "value" property.

The "blank option" is completely unrelated to what you're doing. Blank option is only used with database-driven dropdowns, it's not used when you're supplying the choices from RPG. (it would not correct the symptom you describe, anyway, though...)

You must supply a 'value' that matches one of the 'choice values' you provide. If not, you will have problems like this.

Re: Dropdown Box

Posted: Tue Sep 08, 2015 2:46 pm
by sburden77
Dieter & Scott,

Your recommendation solved my issue.

Thanks