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 / The length of substrin...
Power Automate
Answered

The length of substring can't be longer than '29' which is the length of the source string.

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

I have a problem with a Flow i am working on, which i inherited from a collegue who is no longer in our company.

Now i always get the Error "The length of substring can't be longer than '29' which is the length of the source string."

Maybe one of you can help me with it.

 

Bild1.png

Compose: substring(outputs('Get_task_details')?['body/description'], 0, indexOf(outputs('Get_task_details')?['body/description'], ';'))

Compose 2: substring(outputs('Get_task_details')?['body/description'], 0, indexOf(outputs('Get_task_details')?['body/description'],';'))

Compose 3: substring(outputs('Get_task_details')?['body/description'],indexOf(outputs('Get_task_details')?['body/description'],';'))

Compose 4: substring(outputs('Compose_3'),2)

Compose 5: substring(outputs('Compose_4'),0,indexOf(outputs('Compose_4'),';'))

Compose 6: substring(outputs('Get_task_details')?['body/description'],indexOf(outputs('Get_task_details')?['body/description'],';'))

Compose 7: substring(outputs('Compose_6'),2)

Compose 8: substring(outputs('Compose_7'),0,indexOf(outputs('Compose_7'),';'))

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @DennisPaulun,

     

    I see most of the expressions use an indexOf function to find a semi colon character in the description field. However, if it cannot find this semi colon field the returned value would be -1.

     

    My guess is that it cannot find the ; character in your task details description field.

     

    A -1 (negative number) is not allowed as the length parameter in a substring function.

     

    substring('<text>', <startIndex>, <length>)

    <length> - Integer -  A positive number of characters that you want in the substring

     

    substring('Hello World', 0, -1)

     

    Would return the same error message:

    The length of substring can't be longer than '11' which is the length of the source string.

     

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
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard