cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: How to multiply two sharepoint list columns?

@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

Highlighted
Community Support
Community Support

Re: How to multiply two sharepoint list columns?

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

Re: How to multiply two sharepoint list columns?

@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

Highlighted
Community Support
Community Support

Re: How to multiply two sharepoint list columns?

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

Highlighted
Frequent Visitor

Re: How to multiply two sharepoint list columns?

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

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,924)