Convert Enumeration type to integer

0
I´ve been trying to sum enumeration type attributes using: parseInteger(getCaption($Form/Q4)) but did not work, any ideas?  
asked
2 answers
3

Is the caption numeric in all cases?  Also, maybe some of the captions are empty, so can’t be parsed to an integer?  Do you get an error message?  If so, can you share it here?

**EDIT**

I made an example of this:

Here is the Enumeration

 

I used this for an attribute in an entity

 

Next I created a page so I could enter some values

 

Finally, I created this microflow

 

And here is a video of this in action:

https://youtu.be/7wrpraB0iko

 

Hope this helps

answered
0

Hello Saul,

 

There is nothing wrong with your expression, I tried it myself

 

The expression returns an integer. An integer can be stored in integer type attributes and integer type variables 

Also an integer can be compared with other integers: e.g. 5 = (3+2) is true, 6 >= 1 is true, 1 = 0 is false

 

You probably want to do something similar to this:

 

Hope this helps!

answered