web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint get items i...
Power Automate
Unanswered

Sharepoint get items in power automate not working with integers

(1) ShareShare
ReportReport
Posted on by 6

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
Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at

    If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE. Want to know more? Follow @BradGroux on Twitter, and check out my Medium blog at https://msft.engineer.

  • danielrogers05 Profile Picture
    6 on at

    Thanks for the quick reply, I've included screenshots below.

     

    Screenshot 2020-11-08 at 18.11.56.pngScreenshot 2020-11-08 at 18.11.15.pngScreenshot 2020-11-08 at 18.10.48.pngScreenshot 2020-11-08 at 18.10.58.png

    Screenshot 2020-11-08 at 18.17.53.png

    Screenshot 2020-11-08 at 18.11.05.png

  • Pstork1 Profile Picture
    69,387 Most Valuable Professional on at

    The problem is that the INT() function in Power Automate won't  round up if you try to use it on a whole number with a decimal value.  So it would work as you have it coded for a value of 26.0000, but not 26.4000.  To fix it you first need to remove the decimal portion of the number.  Try using this formula 

    int(formatNumber('@{items('Apply_to_each')?['Total_x0020_Leave']}','#'))
  • danielrogers05 Profile Picture
    6 on at

    Hi there,

     

    I tried using the formatNumber function as suggested but still receive the same error, see below.

     

    Screenshot 2020-11-08 at 19.06.09.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 875

#2
Valantis Profile Picture

Valantis 817

#3
Haque Profile Picture

Haque 481

Last 30 days Overall leaderboard