cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Snohx
Regular Visitor

Number Condition - keeps saying its false if number is higher than 10.

Hey all, 

 

im currently building a flow which compares 2 numbers in a condition.

 

  • String_CustomID is less than String_AvailableSeats

Condition.PNG

 

 

 

 

 

 

The flow itself works perfectly if the number is below 10, but if the number is higher than 10 it ignores the "0" and only uses the "1". Same goes for;

20 = 2

30 = 3

...

 

Var_customid.PNGVar_av-seats.PNGCondition_false.PNG

I don't know if it matters, but here's the value both strings are using to get the numbers;

 

  • CustomID
    • json(string(first(body('Filter_array_list'))))?['CustomID']

  • AvailableSeats
    • json(string(first(body('Filter_array_Trainings'))))?['Verf_x00fc_gbarePl_x00e4_tze']

I would really appreciate if anyone can help me resolving this problem.

 

Regards,

Snohx

1 ACCEPTED SOLUTION

Accepted Solutions

Try to use 

less(json(string(first(body('Filter_array_list'))))?['CustomID'],json(string(first(body('Filter_array_Trainings'))))?['Verf_x00fc_gbarePl_x00e4_tze'])  is equal to true 

in comparison.

View solution in original post

4 REPLIES 4
Paulie78
Super User III
Super User III

If you look at the run history are you sure that both digits of the number are in the JSON source? 

Snohx
Regular Visitor

I can confirm that bot digits are indeed in the JSON source.

Output SharePoint:

SPO_Output.PNG

Input filter array:

fa ap input.PNG

Output filter array:

faf ap.PNG

 

Output SharePoint:

CustomID.PNG

Output filter array:

fa customid.PNG

Try to use 

less(json(string(first(body('Filter_array_list'))))?['CustomID'],json(string(first(body('Filter_array_Trainings'))))?['Verf_x00fc_gbarePl_x00e4_tze'])  is equal to true 

in comparison.

View solution in original post

I'm not sure if it matters in your case, but one thing I notice is that the numbers for your comparison are stored in strings. Why don't you try adding a "Parse JSON" step and providing it a sample so it can build a schema. You can then examine the output of the Parse JSON step to examine the values at that point. That might give you a clue how to proceed.

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (44,766)