Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

FLOW ERROR

(0) ShareShare
ReportReport
Posted on by

I am running the flow during the test and it works at perfectly and does all the action steps. When I launch the flow live, the flow fails and gives the following message but I don't understand because in the test it works perfect every time.

 

Unable to process template language expressions in action 'PartNumber' inputs at line '0' and column '0': 'The template language expression 'split(body('Filter_array')[3], '-')[1]' cannot be evaluated because array index '3' is outside bounds (0, 2) of array. Please see https://aka.ms/logicexpressions for usage details.'.

  • Expiscornovus Profile Picture
    31,635 Most Valuable Professional on at
    Re: FLOW ERROR

    Hi @Anonymous & @Sundeep_Malik,

     

    It might be good to know that index numbering starts with a [0] for the first item, [1] for the second item, [2] for the third item, etc.

     

    In your original expression your were referring to item number 4 aka [3] (which does not exist). That's why your are getting an outside bounds error.

     

    Looking at your example data below, you want to retrieve 416876 Line from the second item, correct?

     

    [
     "The Product Group has been changed on the following Sales Order and Line. SO -",
     "416876 Line - 20 Part - 054140 New Product Group - CA_MFG Cust ID - 1729",
     "Customer - NCC INDUSTRY AB (SWEDEN)"
    ]

     

    In that case it would probably be [1] for the second item, and [0] for the first part of the split.

    split(body('Filter_array')[1], '-')[0]

     

    Hope this helps a bit?

  • Kaif_Siddique Profile Picture
    2,104 Super User 2024 Season 1 on at
    Re: FLOW ERROR

    Hi @Anonymous ,

     

    You are getting above error because array index is outside bounds of array.

    For example, lets take input value 'Power - Automate - Desktop' and apply split expression with separator '-'. Now the input value will split in to 3 sub text. Power , Automate and Desktop. Here the lower bound is 0 and upper bound is 2. So if i want to extract Automate then my expression would be outputs('Compose')[1]. But will get error for index value 3. 

     

    Sample Flow for your reference.

    Kaif_Siddique_0-1663875408453.png

     

    Kindly, check your input value and update the expression based on it.

     

     If you like my response, please give it a Thumbs Up.
    If this helps, please Accept as solution.

     

    Regards

    Kaif

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: FLOW ERROR

    @ExpiscornovusAny help here. I am really bad with expressions.

  • Community Power Platform Member Profile Picture
    on at
    Re: FLOW ERROR

    This is the input data off the HTML to text:

    The Product Group has been changed on the following Sales Order and Line.

    SO - 416876

    Line - 20

    Part - 054140

    New Product Group - CA_MFG

    Cust ID - 1729

    Customer - NCC INDUSTRY AB (SWEDEN)

     

     

    This is the Outputs Data:

    The Product Group has been changed on the following Sales Order and Line. SO -
    416876 Line - 20 Part - 054140 New Product Group - CA_MFG Cust ID - 1729
    Customer - NCC INDUSTRY AB (SWEDEN)

     

     

    in the Filter array this is the input data:

    [
      "The Product Group has been changed on the following Sales Order and Line. SO -",
      "416876 Line - 20 Part - 054140 New Product Group - CA_MFG Cust ID - 1729",
      "Customer - NCC INDUSTRY AB (SWEDEN)"
    ]
     
    this is the outputs for filter array:
    [
      "The Product Group has been changed on the following Sales Order and Line. SO -",
      "416876 Line - 20 Part - 054140 New Product Group - CA_MFG Cust ID - 1729",
      "Customer - NCC INDUSTRY AB (SWEDEN)"
    ]

     

     

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: FLOW ERROR

    @Anonymous 

    So, like you are getting the following data in the email:

    Name      ABC 

    Email.       ABC.com

     

     

    So, I want you to just give me a test data or example data of whatever you are getting in the output of html to text action.

    Exactly same syntax in both the cases. Let's see if there are any differences.

  • Community Power Platform Member Profile Picture
    on at
    Re: FLOW ERROR

    @Sundeep_Malik sorry I don't follow what you are asking me to do?

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: FLOW ERROR

    Hey @Anonymous 

    Can you show the data that's coming after html to text in both cases

    Not the real data but like,

    If name is there, so write ABC, 

    Email: abc@gmail.com

    Maybe there are some changes in the input.

     

    Btw the video you watched it from, the creator of it, will give a solution in a few days. So follow that previous post, if I am not able to answer you.

     

     

  • Community Power Platform Member Profile Picture
    on at
    Re: FLOW ERROR

    These are the screen shots of the flow,

     

    When I run it in testing, the flow is perfect and it does as designed to do. But when I run it on live, the triggers comes up with the error message as shown in the pictures. It saying index 3 is outside bonds (0,2) of array.

    but I don't understand why because in the test it works just fine and no errors on the flow checker

  • Community Power Platform Member Profile Picture
    on at
    Re: FLOW ERROR

    FLOWMASTER3000_0-1663869868359.pngFLOWMASTER3000_1-1663869892368.pngFLOWMASTER3000_2-1663869909073.png

     

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: FLOW ERROR

    @Anonymous 

    In the mean time share something more so I can help. Like what are you doing[Whole Process], some flow screenshots.

     

    Also both run flows side by side to see differences, maybe. 

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow