Comparing numbers in Flow Designer worked like comparing strings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2018 11:28 AM
Hi,
In Flow Designer I was testing an IF-statement where Expenses Record.Amount (type = Floating Point Number) value 25 should have been "<100". But unexpectedly the 25 was seen as higher than 100. When I changed the 100 into 300 it tested OK: the 25 was seen as less than 300. Which suggests the system thought that it was comparing strings. Any idea?
Kind Regards,
Annemie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2018 11:58 AM
Even if it is Floating, can you just try compare it like Number(expense record amount)<100 or ParseInt(expense record amount)<100
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 05:23 AM
Hi Sanjiv, thanks for trying to help!
Well, actually, the point is that I was just following a ServiceNow-offered test in "Flow Designer" in Kingston ("Expenses Getting Started", https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/flow-designer/task/getting-started-flow.html).
Step 6.c. said: "Set Condition 1 to [Trigger->Expenses Record->Amount] [less than] [100.00]." In step 2.c. the field Amount was created as "Floating point number". When I look at the records in the DB, the amounts are aligned to the right, as numerics should.
So I expected the flow to recognize that 25 < 100, but it didn't. I don't see the point in changing the test itself to make the equation work. I don't see what I might have done wrong, but I also can't believe this would be a kind of bug. I'm still stuck...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 01:45 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 01:50 PM
Good to know, finally it worked 🙂
Please mark this response as correct or helpful if it assisted you with your question.