cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted
Memorable Member
Memorable Member

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

Highlighted

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

Highlighted

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,887)