Skip to main content

Notifications

Community site session details

Community site session details

Session Id : wowhYYPSJ+Lm2rwyJ6Ne+L
Power Automate - Building Flows
Answered

Getting "Definition contains invalid parameters"

Like (0) ShareShare
ReportReport
Posted on 14 Aug 2018 07:20:53 by 52

I am working to enhance my skills Microsoft Flows and am starting to use Workflow Definition Language (WDL) expressions.

 

I have created a flow sets up a variable containing the first names of the father or mother or both.  The first names are extracted  from Microsaft form response fields containing combined first and last names.  It is possible that these fields could be empty, have one parent, or have both.

 

I created a variable called FirstNameString that I would like to use in a salutation in a customized email further down in the flow.  Unfortunately, I am getting a "Definition contains invalid parameters", when I try to save the flow after inserting the variable.

 

The expression is: 

if(and(empty(variables('FatherFirstLast')),empty(variables('MotherFirstLast'))),'',if(and(not(empty(variables('FatherFirstLast'))),empty(variables('MotherFirstLast'))),substring(variables('FatherFirstLast'),0,indexOf(variables('FatherFirstLast'),' ')),if(and(empty(variables('FatherFirstLast')),not(empty(variables('MotherFirstLast')))),substring(variables('MotherFirstLast'),0,indexOf(variables('MotherFirstLast'),' ')),concat(substring(variables('FatherFirstLast'),0,indexOf(variables('FatherFirstLast'),' ')),' and ',substring(variables('MotherFirstLast'),0,indexOf(variables('MotherFirstLast'),' '))))))

I should point out that the logic identifies the index of the space between the first and last name, which is then used as the length in the substring for the first name.

 

Appreciate help from anyone.

  • Verified answer
    ras1000 Profile Picture
    52 on 14 Aug 2018 at 17:03:13
    Re: Getting "Definition contains invalid parameters"

    Sorry, it seems to work after clsoing and restarting my flow.

  • ras1000 Profile Picture
    52 on 14 Aug 2018 at 17:01:58
    Re: Getting "Definition contains invalid parameters"

    I apologize.  I restarted my flow and I no longer encounter the problem.

  • ras1000 Profile Picture
    52 on 14 Aug 2018 at 13:22:47
    Re: Getting "Definition contains invalid parameters"

    After doing a little more troubleshootng the problem seems to be occurring indexOf portion of the code, namely the string to be searched.  In my case the string to be search was a string variable that I had created.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started
Loading complete