cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Timmay313
Level: Powered On

Less than, equal too, and Greater than Expresssions

So I am wokring on a "Purchase Request" list in sharepoint. I have the list built so the item information, qty, unit price are all entered and the Total Price as a calculated column "=[Quantity]*[Unit Price]" with the Total Column formatted as Currency. 

 

 here are my list columns:

Request StatusChoice 
Request PriorityChoice 
Request TypeChoice 
Purchase Order RequiredChoice 
Purchase Order No.Single line of text 
Supplier CodeSingle line of text 
Supplier NameSingle line of text 
Supplier InformationMultiple lines of text 
Item CodeSingle line of text 
ItemSingle line of text 
Item DescriptionMultiple lines of text 
Link to Item (if online)Hyperlink or Picture 
QuantityNumber 
Unit PriceCurrency 
TotalCalculated (calculation based on other columns) 
Ship to AddressMultiple lines of text 
Project NameSingle line of text 
Approved byPerson or Group 
Approval DateDate and Time 
Approval StatusChoice 
Request DateDate and Time 
ModifiedDate and Time 
Requested byPerson or Group 
Modified ByPerson or Group

 

For the Flow I have the Trigger as when an item is created, I then have 3 branches with a condition of Less than or equal to $99, Greater than $99 and less than $1199, and greater than or equal to $1200. I am using the following expressions for these: 

 

@lessOrEquals(triggerBody()?['Total'], '$99.00')

@and(greaterOrEquals(triggerBody()?['Total'], '$100.00'),lessOrEquals(triggerBody()?['Total'], '$1199.00'))

@greaterOrEquals(triggerBody()?['Total'], '$1200.00')

 

I have entered an request to purchase 7 Pencils at .50 each for a total of $3.50. the Flow is triggered but instead of processing as it should in the less than $99 it marks all three branches of the flow with a green check showing they completed, under the output it shows False under the <$99, >$100<$1199 and True under the >$1200. 

 

anyone have any thoughts on this? do i need to format the data in the Total column differently so Flow is able to read it as expected?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Less than, equal too, and Greater than Expresssions

Hi @Timmay313,

 

I have made a test on my side and I afraid that there is no any way to compare a Currency type data in the Condition.

You could delete the $ 'in the Condition,you could refer to my screenshot below to create the flow:

Capture.PNG

 

The expression in the Condition as below:

@lessOrEquals(float(triggerBody()?['Total']), 99.00)

 

The expression in the Condition 2 as below:

@and(greaterOrEquals(float(triggerBody()?['Total']), 100.00),lessOrEquals(float(triggerBody()?['Total']), 1199.00))

 

The expression in the Condition 3 as below:

@greaterOrEquals(float(triggerBody()?['Total']), 1200.00)

And when an item is created as below:

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

 

 

View solution in original post

4 REPLIES 4
Timmay313
Level: Powered On

Re: Less than, equal too, and Greater than Expresssions

Continueing to work on this... I have added a Compose to the Flow after the trigger. adding the Total as the input, the ouput i was getting was 3.500000000 or something like that. using the following expression I am attempting to generate a output that works with my condition expressions post above. 

 

if(or(greater(triggerbody()?['Total'], string (10)),equals(triggerbody()?['Total'],string(10))),take(triggerbody()?['Total'],4),take(triggerbody()?['Total'],3))

 

This gets me to 3.50 or 350 as an output still not working but i think im heading in the right direction. 

Community Support Team
Community Support Team

Re: Less than, equal too, and Greater than Expresssions

Hi @Timmay313,

 

I have made a test on my side and I afraid that there is no any way to compare a Currency type data in the Condition.

You could delete the $ 'in the Condition,you could refer to my screenshot below to create the flow:

Capture.PNG

 

The expression in the Condition as below:

@lessOrEquals(float(triggerBody()?['Total']), 99.00)

 

The expression in the Condition 2 as below:

@and(greaterOrEquals(float(triggerBody()?['Total']), 100.00),lessOrEquals(float(triggerBody()?['Total']), 1199.00))

 

The expression in the Condition 3 as below:

@greaterOrEquals(float(triggerBody()?['Total']), 1200.00)

And when an item is created 

 

 

Community Support Team
Community Support Team

Re: Less than, equal too, and Greater than Expresssions

Hi @Timmay313,

 

I have made a test on my side and I afraid that there is no any way to compare a Currency type data in the Condition.

You could delete the $ 'in the Condition,you could refer to my screenshot below to create the flow:

Capture.PNG

 

The expression in the Condition as below:

@lessOrEquals(float(triggerBody()?['Total']), 99.00)

 

The expression in the Condition 2 as below:

@and(greaterOrEquals(float(triggerBody()?['Total']), 100.00),lessOrEquals(float(triggerBody()?['Total']), 1199.00))

 

The expression in the Condition 3 as below:

@greaterOrEquals(float(triggerBody()?['Total']), 1200.00)

And when an item is created as below:

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

 

 

View solution in original post

Timmay313
Level: Powered On

Re: Less than, equal too, and Greater than Expresssions

Thanks! I guess i was over thinking it. now on to the switch condition for the "Request Type" 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 185 members 4,473 guests
Recent signins:
Please welcome our newest community members: