Page 1 of 1

Add choice options to database driven drop down?

Posted: Wed May 23, 2018 9:05 am
by ppbedz
Hi,

I have a data-base driven drop-down that lists employees based on the userid in our employee master file. I would like to add 2 more userids to the list that are NOT in the employee master file. I know I can accomplish by creating a view, or using a "program field" to build the choices and values. I was wondering if there is any way to code some sort of implied "union" with the data-base driven selection parameters? ie. show me all userids in the employee master file plus add "useridabc" and "useridjlk" to the list.

Thank you,
Patti

Re: Add choice options to database driven drop down?

Posted: Wed May 23, 2018 1:40 pm
by SeanTyree
Hi Patti,

I haven't tried this inside of a drop-down widget, but here is an SQL statement that would provide the results you are looking for:
SELECT USERID FROM USERS union
values 'useridabc' union
values 'useridjlk'

Sean

Re: Add choice options to database driven drop down?

Posted: Wed May 23, 2018 1:49 pm
by ppbedz
Hi Sean,

Yes, I could create a view that does what you suggest. However, I was hoping to incorporate using the widget properties instead.

Thank you...

Patti

Re: Add choice options to database driven drop down?

Posted: Wed May 23, 2018 2:02 pm
by SeanTyree
Patti,

Another option would be to use a Universal Display File as the source for the drop-down data.
There is an example of this in the documentation:
http://www.profoundlogic.com/docs/displ ... splay+File

Sean

Re: Add choice options to database driven drop down?

Posted: Wed May 23, 2018 2:05 pm
by ppbedz
Thanks Sean. I will read through the documentation.