I have noticed that the datacard order is not always consistent (datacards change in order) when using an if function in the
Visible property and making changes to datacards. The only solution I found to fix the problem was to make all datacards visible at the same time by setting the Visible property to true, setting the order of the datacards to how it must be and then putting the if functions back in place.
Because this is quite some work for forms with many datacards, I now use an expression like the following during building time:
If(allVisible, true, If([logical_test], true, false))
This way, I only have to update the variable
allVisible to true and all datacards are visible at the same time. When the order is in place, the variable is updated to false.
Using this expression results in a little bit more of an effort when building the app, but will save you much more time when having to fix an order issue.
Removing the additional if function is the last step in building the app because I do not want to add unnecessary if functions in my production apps.