Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Action Initialize_variable failed

(0) ShareShare
ReportReport
Posted on by

I am getting the below error in the flow was setup some time ago and just now started getting this error, however was working fine before.

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.

 

If someone please help me on this would be appreciated

  • v-peijunz-msft Profile Picture
    Microsoft Employee on at
    Re: Action Initialize_variable failed

    Hi @asaleemi 

     

    Based on the error message, there is something wrong with your substring function.

    The syntax of the substring function is:

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

    where the startIndex should be equal or greater than 0.

     

    Here is the doc of showing substring examples for your reference:

    Power Automate Substring Function Explained By Examples (zeitgeistcode.com)

     

    Also, could you please share how you populate the initialize variable action if possible?

    Thank you.

     

    Best regards,

    Sylvia

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow