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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,917)