How to create microflow for drop down list?

0
Hello everyone,   I want to display data based on dropdown. I have taken the months attribute of enumeration type in dropdown. I want to display Integer type of data according to selection of months in dropdown. so how to create microflow for this logic. As you can see in below images, I want to display Damage claim in a page according to selection of months. For this, how I create microflow logic.
asked
2 answers
1

Create an integer variable and based on the enum let it fill with the corret vallue like:

if $yourentity.month = yourmodule.month.january then 1 else

if $yourentity.month = yourmodule.month.february then 2 else

etc.

Regards,

Ronald

 

answered
0

Hi Tushar,

There are multiple ways to do this. If there is only one integer related to the selected month, it might be easy to work only with enumerations.

  1. Create an enumeration with Key as integer and caption as Month name
  2. Enumerations normally gets translated and the localized values are shown. So, you will always see the caption in the drop down.
  3. Then if you want to show the number based on the selected month, you could just use getKey(selectedenumeration), which would already give you the integer.
    1. You mentioned you want to display it some where the actual answer depends on where and how you want to show it. 
  4. This would enable you to easily maintain the integer vs Month. 

 

Or another approach as Ronald already suggested, if you want to maintain the relation of Month vs integer outside hardcoded in a microflow, then you could use exclusive splits.

-------------------- EDIT ANSWER -----------------------------

  1. In the On change event of the drop down, write a MF. This will pass the data view object already to the MF. Then from the data view retrieve the month selection like $Entity/Month.
  2. Retrieve Damage claims given the Month. You must do this with DB retrieval. 
  3. Then return the damage claims to the charts. 

 

NOTE: I dont know how the charts are working in your page at this moment. But you must knew this already. So, I only gave you the logic of retrieving the Damage claims for the select month. Please write your exact question the first time, so you get the nearest possible answer. You first question was: how to retrieve integer based on Enumeration. But now the question is totally different. 

 

 

answered