[Lookup] Rendered as Picklist, when required loses " --

Posted by Rollbase User on 20-Feb-2012 04:38

Hello and Good Day, I noticed that when changing a lookup to render as a picklist and then making it a required field via page editor the first option " -- Please Select -- " is not rendered onto the picklist. Screenshot:  I think that this is an intended change since it does eliminate the possibility of the user not inputting a value onto a required lookup field but the problem we are encountering is that if there is only one value (like in my example) the onchange of the field wont run, since technically the value did not change. Unlike before where you have to click and set the value from "-- Please Select --" to another value. Could we have the ability to include/exclude the "-- Please Select --" option as the first value of the picklist? - probably as another checkbox for lookup fields re

All Replies

Posted by Admin on 20-Feb-2012 11:25

"Please Select" option is not included if value is required. This is intentional.

Posted by Admin on 20-Feb-2012 19:07

Yes I do believe that it is intended.

But how do we fire the onchange function of the component if there's only one value ? Say we have queries or showhide which are dependent on the value of the lookup picklist.



This is why I asked if we could have the option to include or exclude the -- please select -- option if needed :-)



Thank you very much

Piscoso, Martin

Rollbase ph

Posted by Admin on 22-Feb-2012 01:26

Yes this is also my problem, if my picklist only had a single value how can i fire the onchange event if it will automatically set the first value?

Posted by Admin on 22-Feb-2012 11:10

Picklist has default value if {D} symbol is used.



I'd recommend to call onchange explicitly in onload script:



document.theForm.mypick.onchange;



Try search the web for more examples.

This thread is closed