cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mhorian
Frequent Visitor

Update a Sharepoint column with a value retrieved from a form reply

Hi, 

 

I have a form with an Likert question. 

 

  excellentvery goodbadvery bad
topic 1    
topic 2    
topic 3    

 

Depending on the replies I receive for each topic I want to get a value in a Sharepoint column, using this function:

 

For Topic 1 if:

- excellent is selected I want to get 40*1.5

- very good is selected I want to get 30*1.5

- bad is selected I want to get 20*1.5

- very bad is selected I want to get 10*1.5

 

For Topic 2 if:

 

- excellent is selected I want to get 40*1.3

- very good is selected I want to get 30*1.3

- bad is selected I want to get 20*1.3

- very bad is selected I want to get 10*1.3

 

etc

 

Then it comes another choice question where again, depending on the choice made, the above score should be multiplied with 10, 15, 20, 25 etc.

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User II
Super User II

Hi @mhorian 

You could do something like this to calculate topic 1, for example:

topic1.png

 

The expression would be:

if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Excellent'),mul(40,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Good'),mul(30,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Bad'),mul(20,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Bad'),mul(10,1.5),0))))

Where outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'] is the answer to topic 1 (this value would depend on your form, so you will need to replace it in the expression).

The expression read the answer value, and depending on the value, returns the values according to your formulas.

Then, you would do the same for the other topics.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

3 REPLIES 3
fchopo
Super User II
Super User II

Hi @mhorian 

You could do something like this to calculate topic 1, for example:

topic1.png

 

The expression would be:

if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Excellent'),mul(40,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Good'),mul(30,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Bad'),mul(20,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Bad'),mul(10,1.5),0))))

Where outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'] is the answer to topic 1 (this value would depend on your form, so you will need to replace it in the expression).

The expression read the answer value, and depending on the value, returns the values according to your formulas.

Then, you would do the same for the other topics.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

mhorian
Frequent Visitor

Thanks for the reply! I will try it and let you know! Regards!

mhorian
Frequent Visitor

Worked like a charm! Thank you!

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (46,689)