Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
 View Only
  • 1.  Do Until Multiple Expression Error

    Gold Contributor
    Posted 14 days ago

    I am using a Do Until with two conditions and I keep getting this error:

    Unable to process template language expressions for action 'Do_until' at line '1' and column '40434': 'The template language function 'not' expects one parameter: the boolean value to negate. The function was invoked with '2' parameters. Please see https://aka.ms/logicex

    My expression is: If the Request Date is empty/null AND the 'varNotOverLoop' is 1. I don't get any errors when I save Flow. I've gone back into it multiple times to ensure the expression hasn't changed.

    @and(not(equals(outputs('Update_NotOver_PAS_Rejected')?['body/RequestDate'], null),equals(variables('varNotOverLoop'), 1)))

    I've tried everything detailed in this blog (and another blog that has similar recommendations) Fix the InvalidTemplate error in Power Automate | Encodian Could it be it doesn't work well with a 'null' value? Any thoughts as to what is wrong?

    Note: I use a single expression in another flow with Do Until and it works fine.



    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------


  • 2.  RE: Do Until Multiple Expression Error

    Silver Contributor
    Posted 14 days ago
    Hi Beth,

    Do you actually mean to have the not in there? You said you're checking if the Request Date IS null, so that's your equals function. If you mean that you're checking if the Request is NOT null, then the parentheses that belongs to the not function should go right after the null).
    Power Automate is complaining because currently the "end paren" of the not function is all the way at the end, and it's seeing the ,1 as a parameter for the not.
    Does that make sense?

    Sandy

    PS - Hello from nearby Naples :-)  [I moved there last Feb, but I can't see how to get the UG to change my location :-) ]

    ------------------------------
    Sandy Ussia
    Business Applications MVP
    Technical Evangelist, Lightning Tools
    Co-Founder, NLightning
    sandy@sandyu.com
    United States (currently)
    ------------------------------



  • 3.  RE: Do Until Multiple Expression Error

    Gold Contributor
    Posted 14 days ago
    Hi Sandy,
    Sorry if I wasn't clear. In a previous step, I have an Update Item action that sets the Request Date to 'null'. I do that because I want that to be re-entered when the user re-submits the form and must then enter a new Request Date. Once the Request Date is not null and the varNotOverLoop has incremented to '1'.

    Perhaps there's a better way to accomplish this, but essentially the Flow needs to allow the Requestor to submit the form. If approver rejects it, then the Requestor should get one more opportunity to re-submit.

    Welcome to sunny, but sort of chilly this weekend, Florida!!! I love it here. 


    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------



  • 4.  RE: Do Until Multiple Expression Error
    Best Answer

    Silver Contributor
    Posted 14 days ago
    Hi Beth,

    So then I think you want this for your expression:
    @and(not(equals(outputs('Update_NotOver_PAS_Rejected')?['body/RequestDate'], null)),equals(variables('varNotOverLoop'), 1))

    When I have several functions in one expression, I find it helpful to write it out to myself on separate lines so I can be sure the parentheses are in the right places. Like so:
    equals(outputs('Update_NotOver_PAS_Rejected')?['body/RequestDate'], null)
    Then you want to NOT that:
    not(equals(outputs('Update_NotOver_PAS_Rejected')?['body/RequestDate'], null))
    Then you want to AND that result with
    equals(variables('varNotOverLoop'), 1)
    So you end up with:
    and(not(equals(outputs('Update_NotOver_PAS_Rejected')?['body/RequestDate'], null)),equals(variables('varNotOverLoop'), 1))

    Does that help?



    ------------------------------
    Sandy Ussia
    Business Applications MVP
    Technical Evangelist, Lightning Tools
    Co-Founder, NLightning
    sandy@sandyu.com
    United States (currently)
    ------------------------------



  • 5.  RE: Do Until Multiple Expression Error

    Gold Contributor
    Posted 13 days ago
    Yes! thank you so much. I think I got it. I did try putting the conditions on multiple lines as you suggested. But I had something off.

    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------



  • 6.  RE: Do Until Multiple Expression Error

    Silver Contributor
    Posted 13 days ago
    Great! Happy to hear it!

    ------------------------------
    Sandy Ussia
    Business Applications MVP
    Technical Evangelist, Lightning Tools
    Co-Founder, NLightning
    sandy@sandyu.com
    United States (currently)
    ------------------------------