
Announcements
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.
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'),';'))
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.