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 / Issue with length - da...
Power Automate
Unanswered

Issue with length - data from spreadsheet

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good morning,

I have had an issue with flow processing a spreadsheet.

A column is supposed to have a INTEGER value in it - or be blank.

Because I am putting this data into Dynamics 365 I check the value using length(item?['fieldname'])

If blank it give me a length of zero which I use to set a variable to (to put into Dynamics). If not zero I convert the value to integer and put that in the variable.

All of the above works fine however...............

If in the spreadsheet the user makes a mistake and puts a decimal value into the field - e.g 996.8, the length check barfs.

Interestingly enough, although an error is thrown (inside a for each loop), it continues to process the rest of the records.

The code outside the for each loop however does not execute.

I have tried to simulate the issue using string variables but it works fine - it seems to be specific to processing data from an excel spreadsheet.

 

Any thoughts?

Categories:
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @Anonymous 

    Hi there.  Is the length check only there to make sure there's a value?  If so, maybe consider using Coalesce() instead.  You could simply have Coalesce(<dynamicvalue>,<whateveryouwant>) and if the dynamic value is empty/null, it will pass the <whateveryouwant> instead.

     

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for that - I will try that

     

    Stan

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard