Hi,
I have records in my Dataverse table which can have state 'Concept' or state 'Final'. If you want to change the record with state Final my PowerApp creates a duplicate of this record. So the record with state Final remains as is. A new record is created with state Concept copying all fields and include the changes. Next to that the new concept record also stores a CopyOf field pointing to the original final record. This is working perfect.
But now I want to create a flow to fetch all final records unless there is a concept record available for this final record.
What I created in my flow:
1. Retrieve all concept records.
2. Store all CopyOf values in a variable (for instance: 'd7dac597-41f2-ec11-bb3d-0022489eb857', '6de93a6b-1ff2-ec11-bb3d-0022489eb857')
3. Retrieve all concept records and all final records where id of the record is not in the variable.
My filter is:
(_cr438_versie_id_value eq 'd757b16f-85d6-ec11-a7b5-0022489de7d3') or (_cr438_versie_id_value eq 'e257b16f-85d6-ec11-a7b5-0022489de7d3' and cr438_tblwerkervaringid in (@{variables('ConceptWerkervaringReeks')}) eq false)
However this is not working. The flow is doing several attempts to fetch the data. But finally it fails with:
Bad Gateway: "Index was outside the bounds of the array."
I drilled down that also the filter IN is not working. I tested the filter with:
cr438_tblwerkervaringid in ('d7dac597-41f2-ec11-bb3d-0022489eb857', '6de93a6b-1ff2-ec11-bb3d-0022489eb857')
There I bypassed the NOT IN and the use of variables. But that also is not working. It fails with:
Bad Gateway: "The method or operation is not implemented."
Can someone indicate to me how to filter records from the dataverse where I can exclude certain records based on several id's?
I want to keep the filtering in one go, since I order the records in a complicated way. And if I have to split the filtering and combine it later on, it is hard to get the order as wanted.