cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmclaughlin
Post Patron
Post Patron

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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,111)