I'm accessing the Version of a list element via MS Flow. It works in Flow A accessing List X but not in Flow B accessing List Y. Both Flows are triggered by the creation/change of items in the respective lists. Both lists have major versions activated and the views are set to display the version column.
Flow A uses the expression
add(int(triggerBody()?['{VersionNumber}']),1)
which evaluates properly (the way I want) to my own surprise, because VersionNumber is a string of the format M.m.
Flow B uses a different expression
equals(mod(int(triggerBody()?['{VersionNumber}']),2),1)
which doesn't work, because the interpreter stops at int() complaining about improper parameters. To track this down I added a string variable to Flow B to get the VersionNumber before conversion and it is apparently empty (""). But the JSON-data clearly contains the pair "{VersionNumber}" : "M.m", as I can check it in the triggerBody() after doing a test run.
So difference seems to be that the version string is empty with my second sample hence it cannot be converted to int. Where should I start to search?