Can I create a dynamic enum from the Database?

0
Hi, In my application, I have one enum called Display. This enum consists of five values Phone, TV, Laptop, Desktop and Other. If I select Other from the drop down, it will gives another input text box to enter user choice manually. And this enum selected value is stored in a variable called Display_As. Now, In one of my page, I want to use this field as search field with dropdown( this consists of all the values from the enum and the data stord in database of Display_As variable). Now I want to show the all values in the drop down when the user clicks to search based on this Display field. Anyone please help me in this issue.. Thanks & Regards, Venkat.
asked
1 answers
0

Hi Venkat,

  If you want to use the dropdown widget to select from a single list, you will have to have one attribute that contains all the desired values.  If you are using enumerations, you will have to have another enumeration with all values (TV, Laptop, Desktop, Phone, and all the values for 'other) and as soon as a user selects either Phone, TV, laptop, or one of the 'Other' values, then you must set this value behind the scenes using an on-change microflow.  It does mean that you will need to maintain separate enumerations, but it will give you the UI you are looking for.

  Best,

Rob

answered