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
Super User

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
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Users online (2,173)