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 / Start index error - su...
Power Automate
Answered

Start index error - substring

(0) ShareShare
ReportReport
Posted on by 6

Hi, I have some problem with my flows. Everything was working since a few months and yesterday I have received error message: The 'start index' for function 'substring' must be equal to or greater than zero and must be less than '0' which is the length of the string..

However I didn't change anything. I can also see that sometime I have a success but its 1 success and 10 errors (or more). When I performed the test, there was also error. Anyone of you had such issue? Do you know the reason?

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,983 Super User 2026 Season 1 on at

    Hi @gabie ,

     

    Please share the flow, expressions used, along with some sample data.

     

    Please also provide a screenshot of the error and where in the flow the error occurs.

     

    Thanks,

     

    Elllis

  • gabie Profile Picture
    6 on at

    In general this flow is for hiding the emial under appropriate folders in outlook. The step which has error is "filter array":

    gabie_0-1659693341662.png

    substring(item()?['main_folder'], 0, 4), short_dCode is set as variable in previous step:
    gabie_1-1659693527283.png

     

    The flow is using a information from macro as an input. It's been worked for a few months without any issue.

  • Verified answer
    Ellis Karim Profile Picture
    11,983 Super User 2026 Season 1 on at

    Hi @gabie 

     

    Please check that the data for the column 'main_folder' to ensure that it contains data and is not empty.

     

    As your source data is Excel please check the Excel file for missing data or empty rows. Is there a row at the end of Excel the table, which if read returns an empty value for 'main_folder' causing the expression to fail

    substring(item()?['main_folder'], 0, 4)

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • gabie Profile Picture
    6 on at

    You're right, I missed empty row, thank you for your help 🙂

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard