Can we convert Enumeration to integer datatype

0
Hi, I am trying to covert enumeration (‘Jan’, ‘Feb, ‘Mar’,….) to integer(1,2,3,…..), when I select ‘Jan’ from drop down and should convert to 1 in microflow how to do this, please help me
asked
3 answers
1

You can use the Object decision type for this use-case.

answered
1

Just create a submicroflow which has the Enum as an input parameter. Use a Decision activity and use an integer as your return variable. Call that microflow whenever you need to make the conversion.

 

answered
-1

Hi Pranaya,

 

Another way to do it is using the Enumeration Name with the values 1, 2, 3, etc. and the Caption Jan, Feb etcetera (depending on the language). In the microflow use getCaption($Period/Month) to use the Caption values, use getKey($Period/Month) to get the Names 1, 2, 3. I think you should check if they are of type String or Integer and use parseInteger($String) to get the Integer value.

 

Go make it

answered