Power Automate doesn't seem to compare strings using the same rules that most programming languages do.
I ran into this problem when working with orderHints for checklists in Planner tasks. I'm re-creating a task from a template, and I need all of the checklists to be in order.
The issue is that Power Automate usually seems to follow this method when comparing strings, but not always.
Here's an example. I need to compare two orderHints. One is '858558816[?', and the other is '858558816=2'. If I compare them in Python, it correctly identifies that the first value is greater.
print('858558816[?' > '858558816=2')
Running that will return True.
If I make the same comparison in Power Automate, however:
It returns False:
Like I said, most of the time Power Automate is comparing strings the way I would expect. But it is wrong often enough that it's useless for using orderHints, and I imagine for a wide variety of other string comparison tasks.
Does anyone know a reason for this behavior? Is Power Automate using a completely different comparison method? Is there any way to get it to compare using ordinals, like other languages?