cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmclaughlin
Helper V
Helper V

In a powerautomate I need to update a sharepointlist item

In the update item I have this expression on one of the colums in the flow
 
sub(int('Floater Used'),int('Number of Days')) and
sub('Floater Used','Number of Days')
I've tried both ways. The thing is column 'floater used' and 'number of days' are both numbers in the sharepoint list already so I tried the Int function just as an attempt
 

I'm getting this error
InvalidTemplate
. Unable to process template language expressions in action 'Update_item_2' inputs at line '1' and column '3290': 'The template language function 'sub' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#sub for usage details.'.

1 ACCEPTED SOLUTION

Accepted Solutions
v-JessicaG-msft
Community Support
Community Support

Hi @dmclaughlin ,

 

Do you want to use the column value in the SharePoint list as the parameter of the sub function to update the SharePoint item?

 

You could assign the values of columns in SharePoint to variables, and use the variables in the sub function to obtain the calculation results. I have test for your reference, please try the following workaround:

vJessicaGmsft_1-1637218334954.png

 

 

Best Regards,

Jessica Gu

View solution in original post

1 REPLY 1
v-JessicaG-msft
Community Support
Community Support

Hi @dmclaughlin ,

 

Do you want to use the column value in the SharePoint list as the parameter of the sub function to update the SharePoint item?

 

You could assign the values of columns in SharePoint to variables, and use the variables in the sub function to obtain the calculation results. I have test for your reference, please try the following workaround:

vJessicaGmsft_1-1637218334954.png

 

 

Best Regards,

Jessica Gu

Helpful resources

Announcements
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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,158)