cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arvidb
Level: Power Up

add() expression only allowing 2 parameters

So, I am using Flow to load a Microsoft Forms response to a JSON file in Azure Blob Storage. All is working well. However, my form consists of tickbox questions that translate to numeric values that I want to add up.

 

The add() expression only allows for 2 paramaters while I have up to 8 paramaters (question scores) I would like to add up at once. The only solution I have found so far is to keep nesting add() expressions to allow for more than 2 parameters to be added at once.

 

Is there another workaround for this? If not, why is there no sum() expression in addition to add() that allows for more than 2 paramaters to be added?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: add() expression only allowing 2 parameters

HI @arvidb 

 

The add() expression just allows two inputs as you have marked. Instead of nesting many add() functions, i would suggest you to use arrays and increment array variable. Please have a look at the screenshot below: 

addloop.png

Hope This Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: add() expression only allowing 2 parameters

HI @arvidb 

 

The add() expression just allows two inputs as you have marked. Instead of nesting many add() functions, i would suggest you to use arrays and increment array variable. Please have a look at the screenshot below: 

addloop.png

Hope This Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

arvidb
Level: Power Up

Re: add() expression only allowing 2 parameters

@yashag2255 

 

Thanks for your response. This wasn't the exact solution I needed but it pointed me in the right direction so I accepted your answer as a solution.

 

My solution is as follows:

 

I initialize a variable set to 0, use an apply to each with an increment variable task for each separate form question with a corresponding value I want to add using int(<form-question-reference>).

 

The initialized variable now contains the sum off all increment variables added up.

 

Annotation 2019-06-03 155542.png

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 167 members 5,569 guests
Please welcome our newest community members: