
I have a flow that feeds from a Microsoft Form and adds the user inputs into a Sharepoint List. The form has 14 questions, and for each question, the user can select the following: No Impact, Low Impact, Medium Impact, and High Impact). Example of the String in the List
I'd like to convert all of the responses to integer values
No Impact = 0
Low Impact = 20
Medium Impact = 60
High Impact = 100
I was thinking of using 14 Compose If statements for each of the columns, but I was unsure if there was an easier way to compose this?
You can achieve this with an expression inside the Create item action
if(equals(Trigger Field, 'No Impact'), 0, if(equals(Trigger Field, 'Low Impact'), 20, if(equals(Trigger Field, 'Medium Impact'), 60, if(equals(Trigger Field, 'High Impact'), 100, 0))))