web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Approval Workflow

(0) ShareShare
ReportReport
Posted on by 98

Hi,

 

I have an approval workflow like this:

 

1. X approves the request and updates SharePoint list with approved value;

2. If the said amount > 100,000, it goes to Y for approval; if < 100,000, proceed to next step

 

Any idea how to build the flow?

 

Earlier on I put up a condition: Amount field (when an item is created) > 100,000 and it shows the following error msg which I suspect the said field was empty at the point of item creation (value only inputted by X later):

 

Unable to process template language expressions for action 'Condition_3.1' at line '1' and column '2856': 'The template language function 'greaterOrEquals' expects all of its parameters to be either integer or decimal numbers. Found invalid parameter types: 'Null'.'.

 

Any quickround on this?

 

Thanks in adavance!

 

 

Categories:
I have the same question (0)
  • Rahber Profile Picture
    1,935 on at

    I believe its because the variable you are checking is getting a null value. Can you initialize a Integer variable and set it with amount value and then in your condition you use the variable to check if its greater than the threshold.

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,
    Rahber

  • SK_Tan Profile Picture
    98 on at

    Hi Rahber,

     

    Thanks for your prompt response.

     

    I tried and I got the following error msg:

     

    The variable 'CL' of type 'Integer' cannot be set to null or empty value.

     

    I do not think it's the integer issue.

     

    1. Before this, I tried earlier on to create an item with the value filled and the flow works.

    2. Only when I create an item without the value pre-filled (because the value only populated by X at later stage), the flow failed.

  • Jronash Profile Picture
    827 on at

    Check out the coalesce() function, in expressions.  It allows you to provide it with multiple values, and it will return the first one that is not null.

     

    In your case, you can use it to provide a default value in the situation where your Amount is null.  It would look something like this:

    coalesce(something['Amount'], 0)

     

    This would return the value of Amount, unless it is null.  In that case, it returns zero.

     

    I don't know how to reference your actual Amount variable since I don't know how your data is organized.  You should be able to select it from dynamic content when you reach that part of the expression.

     

  • SK_Tan Profile Picture
    98 on at

    HI,

     

    Thanks for your help.

     

    It doesn't work. So in my test person X inputted 120000 in SharePoint list and it should flow to person Y for approval (YES branching)). It end up in the other branching (NO branching) instead. I guess the coalesce still get the first value when the item was first created. I would need the condition to take the value last inputted by person X.

     

    Please see below my flow and test results:

     

    SK_Tan_1-1610763924980.png

     

    SK_Tan_0-1610763696486.png

     

     

  • Jronash Profile Picture
    827 on at

    Can you post your full coalesce expression?

  • SK_Tan Profile Picture
    98 on at

    It look like this:

     

    coalesce(triggerBody()?['Credit_x0020_Limit_x0020_Approve'])
  • Jronash Profile Picture
    827 on at

    Ok, change it to this:

    coalesce(triggerBody()?['Credit_x0020_Limit_x0020_Approve'], 0)

     

    Next, for troubleshooting, create a Compose action before your Condition 3.1 block.  In the compose block, put this expression:

    triggerBody()?['Credit_x0020_Limit_x0020_Approve']

     

    This will allow us to check the run history and make sure that the trigger value is what we think it is.

     

  • SK_Tan Profile Picture
    98 on at

    Hi,

     

    It didn't work.

     

    I copied and paste and I got this error msg instead:

     

    Unable to process template language expressions for action 'Condition_3.1' at line '1' and column '2855': 'The template language function 'greaterOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'.

     

  • Jronash Profile Picture
    827 on at

    Well, that's a more helpful error.  It's failing because one of your values is a string, and the other is an integer.  They need to be the same type for Automate to be able to compare them.

     

    I'm assuming that your trigger is returning the Credit Limit Approve as a string, not an integer.  So we can tweak our expression slightly to convert it to an integer.

     

    coalesce(int(triggerBody()?['Credit_x0020_Limit_x0020_Approve']), 0)

     

     

    Did you also create a compose action before the condition with this formula?

     

    triggerBody()?['Credit_x0020_Limit_x0020_Approve']

     

    When you look at your run history, does it have the value that you expect?  (The Credit limit Approve value)

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard