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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The length of substrin...
Power Automate
Unanswered

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:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard