0

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?

2
  • 1
    As you have mentioned views are set to display versions, do you see version numbers for List Y in SharePoint views? First we need to make sure that it is viewable in the views. It should not matter what expression you use, the output from the trigger of the Flow should be showing the version number if it is available in SharePoint Nov 14, 2020 at 18:39
  • Yes I see the version, and the version is also part of the whole JSON data being processed by the Flow. In the meantime I have found out, what the real problem was. I will post it as an answer.
    – Ariser
    Nov 21, 2020 at 13:11

1 Answer 1

0

The problem was, I had disabled parallel processing for that trigger. What does that mean?

Power Automate allows to collect some events related to changed list items. This collected changes are then processed by the flow which has a trigger on this. Unfortunately it changes the structure of the JSON-data transmitted to the flow. Of course the data of all changed items has to be superseded by some array. Thus, the bare access to the elements of an item has to fail.

If you still want to aggregate the changed items you have to wrap a foreach-loop around your whole flow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.