Expression to Replace HIGH, LOW or MEDIUM with a number(1, 5, 9 respectively)
Sorry for the somewhat newbie question, but I need to do some replacing as the title explains.
I know how to do a compose with:
replace(outputs('TaskValue'), 'MEDIUM', '5')
Which will output the 5 if the TaskValue is Medium, but what I need is to have it in the same output either of the three values (HIGH, MEDIUM, LOW) converted to 1, 5 or 9, so I can use the output of that compose to fill out a field down the Flow.
How can I achieve that? Grateful for any help provided.
Solved! Go to Solution.
Hi @flavioPBadmin,
Since this is only 3 values, I would go for the easiest option which is a nested replace functions in an expression.
replace(replace(replace(outputs('TaskValue'), 'MEDIUM', '5'), 'LOW', '9'), 'HIGH', '1')
Hi @flavioPBadmin,
Since this is only 3 values, I would go for the easiest option which is a nested replace functions in an expression.
replace(replace(replace(outputs('TaskValue'), 'MEDIUM', '5'), 'LOW', '9'), 'HIGH', '1')
Thanks, that works for me!
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
136 | |
49 | |
42 | |
36 | |
28 |