cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gabie
New Member

Start index error - substring

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 

View solution in original post

4 REPLIES 4
ekarim2020
Super User
Super User

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
New Member

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.

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.

 

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

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,732)