How to create Enum type variable in microflow having new values

I retrieved one object from the database in a microflow. Than i created a variable of type enum. The retrieved object has four attributes of data type String. Now I want to update the new enum variable which i created, to have these four attribute value. For example: From database i retrieved four attributes named option1,option2,option3,option4. All of these are of type string. Now i have created a variable of name 'ChoseOption' of Enum type. I want the value of this variable to become those four attribte values that i retrieved.
2 answers

In short this is not possible. An enumeration is a list of predefined values so it is not possible to change this list run time. Furthermore an attribute or variable in this case hold exactly 1 value, unless it is a list ofcourse. This means that you are not able to store 4 attributes into 1.

Correct me if i am wrong here, but to me it sounds like you want to connect multiple objects, not attributes, to 1 parent object. Lets continue in your example. Say you retrieve a list of valid options and want to show these options in a screen so that the user can select one of these options you will need a ChooseOption entity that has a reference set to the object Option. When you retrieved options option1, option2,option3 and option4 you can add them to the reference set of your ChooseOption Entity by using the Change Object Activity.

Also it would be helpfull if you give us some more information about your problem.


Here is a screenshot with an example.

The idea is that you create a config of an exam. Than when a student takes an exam the exam is generated based on the config with its questions and the possible answers connected to the question.

Then you have to build your screens in such a way that a student is able to select 1 answer for his each question.

Click here to view full size