Regarding Enumeration

0
I Have One Question in that How i add the new value like i add the values in enum is 1,2,3,4 and i have to add 5 in the page where i have to store information what should i can do?? ex:- in the web page i click on dropdown in that time dropdown is open and show all valus of Enum and in that time i have to add another value like in the college application form the ask for previous school/college name and in their database my school/college and college name is not registered so i have chose the filed of Other and in that time in their form open one text box and we write our school/college name in that box   
asked
2 answers
0

You could have an entity with 3 attributes:

  1. The first one is your enumeration with the predefined values and an ‘Other’ value. So it should look like this:
  2. The second one is a string attribute that acts as the input field when selecting 'Other’. On the page you show this input field conditionally: only when 'Other’ is selected.
  3. The third attribute is your answer attribute. It contains either the value of the enumeration OR when 'Other’ is selected, the value of the input field of the second attribute. You can fill this attribute when saving the object.

 

Hope this helps!

answered
0

Rushikkesh,

 

Here is a slightly more detailed explanation:

  1. Create an entity described in my previous answer. For now we will call it Question, and the attributes: Options (Enumeration), Other (String) and Answer (String)
  2. Create a page where you want to add the Question
  3. The page should have:
    1. A radio button: This shows the enumeration values of atrtibute Options.
    2. An input field for attribute Other below the radio buttons. This input field is only visible when the 'Other’ option of the Options above is selected. You can set this in the Conditional visibility of the input field properties.
    3. A button that calls a Microflow to save the Question.
  4. When clicking the save button, a Microflow should run that should have:
    1. A parameter for the Question object.
    2. Add a decision that checks if the value of Options is 'Other’.
      1. If yes: set the answer of the question to the value of the input field on the page.
      2. If not: set the answer of the question to the value of the radio button: getCaption($Question/Options)
    3. Save the Question.

Hope this helps!

answered