I'm trying to create a Power Automate/Flow which sums a column using get items. Ultimately I want to pass the sum value to another Sharepoint list, however everything I try in power automate seems to fall down when using integers. It would appear power automate is getting list items as strings and ignoring the field type.
When I try to use compose to get an integer field I get this error:
The variable 'varSumLeave' of type 'Integer' cannot be initialized or updated with value '266.400000000000' of type 'String'. The variable 'varSumLeave' only supports values of types 'Integer'.
When I try to convert the string to an integer using the int() function I get this error:
The variable 'varSumLeave' of type 'Integer' cannot be initialized or updated with value 'int('266.400000000000')' of type 'String'. The variable 'varSumLeave' only supports values of types 'Integer'.
"int('@{items('Apply_to_each')?['Total_x0020_Leave']}')"
I've been trying to get this to work for days now but nothing seems to work, any help would be greatly appreciated. Thanks