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

View solution in original post

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,447)