Calculating with enumerations

1
Hi, I was wondering how i can calculate a value based on 3 different enumerations. Example: Enum_1 value 1 ... 10 Enum_2 value 1 ... 10 Enum_3 value 1 ... 10 Based upon what ever choice one makes within these 3 enumerations i would like to calculate the total in an other field Total_Enum (float) If one chose "2" in Enum1, "3" in Enum2 and "5" in Enum3 i want to have a grand total of "10" in TotalEnum. I already tried creating new variables (with toString) from the 3 enumerations and add them together, but no solution there. Any help is highly appreciated.
asked
1 answers
2

Aswin,

Your enums have a caption and a value combination like 1 1, 2 _2......10 _10. In the microflow you create a integer variable for every enum and give it the value:\ parseInteger(getCaption($Entity/EnumAttribute1)), parseInteger(getCaption($Entity/EnumAttribute2)), parseInteger(getCaption($Entity/EnumAttribute3)). In the third action change the TotalEnum field by adding the three variables in a change object activity with a refresh to show the result on the screen.

The total enum field should in this case be a integer as I'm adding integers, but probably using parseFloat will allow you to have the addition in a total field of type float.

I hope this helps.

answered