cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lamacz
Level: Powered On

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

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

Community Support Team
Community Support Team

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

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

Community Support Team
Community Support Team

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

lamacz
Level: Powered On

Re: How to multiply two sharepoint list columns?

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

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 (Last 30 Days)
Users online (4,845)