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!
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,143)