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

How to multiply two sharepoint list columns?

Hi all,

 

I have stucked with some elemental calculation requirement that I need to implement into my flow.

My idea is to take data filled by user regarding "savings" (column format is number) and multiply this with looked up column "Recharge" (column format is also number).

 

I believe this is done through math expression, however I can not get this thing work (I only tried something this naive:

 

mul('savings','recharge')

 

And got an error that parameters should be integer or a decimal.

 

Is there any kind soul that is willing to give me any guidance here?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

@lamacz:

 

I ran a quick test with the following expression and had no issues:

mul(body('Get_item')?['savings'],body('Get_item')?['Recharge'])

 

Your issue is that you need to select the SharePoint columns from Dynamic Properties (or manually enter them in the proper format) rather than just entering the column name inside or single quotes.  Flow is interpreting your input as a string rather than a reference to a column - that's why is says that your input must be an integer or decimal.

 

DynamProp.jpg

 

If this solves your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Community Support
Community Support

Hi @lamacz,

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the Compose as below:

mul(triggerBody()?['savings'],int(triggerBody()?['Recharge']?['Value']))

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
Super User III
Super User III

@lamacz:

 

I ran a quick test with the following expression and had no issues:

mul(body('Get_item')?['savings'],body('Get_item')?['Recharge'])

 

Your issue is that you need to select the SharePoint columns from Dynamic Properties (or manually enter them in the proper format) rather than just entering the column name inside or single quotes.  Flow is interpreting your input as a string rather than a reference to a column - that's why is says that your input must be an integer or decimal.

 

DynamProp.jpg

 

If this solves your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Community Support
Community Support

Hi @lamacz,

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the Compose as below:

mul(triggerBody()?['savings'],int(triggerBody()?['Recharge']?['Value']))

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

Thank you so much, both solutions are working like a charm.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (1,930)