Below some more details on a working solution.
My domain model:
With the security on the Purchase entity setup as below:
[not(MyFirstModule.Purchase_User='[%CurrentUser%]')] as the xpath constraint
The user module role has read/write access to the entity and is allowed to create and delete records.
Created an overview for the purchases with a button that performs the skip action:
Be aware that the change object activity commits the object and that the change to the reference set is done with the type add and not the default set type.
Now when user test1 selects a record and uses the skip button the record is associated with his user record and as the xpath constraint only allows records to be shown for which there is no path to the current user over the association to the user the record will not be shown (be aware that a refresh of the object is needed in the change activity). User test2 can still see the record as his user record is not (yet) associated to the purchase record.
Hope this helps in finding what is wrong in your model, if needed I can send you the project to serve as an example, just drop me a line via the comments or via my profile.
When you have multiple users viewing the list using the changed by attribute would not work, as when user 1 changes the object the object can be made “invisible” for this user, but as user 2 does the same the changeby field now will make sure that the record is no longer shown to user 2 but is shown to user 1 again.
Why not create an association to the user object and set this with a microflow. So that when user 1 performs the action the association (1-*) contains user 1. Make sure the xpath only shows those records where ther is no relation to the current user via the association. The when user 2 performs the action the only result of this action is the effect on the data that user 2 sees.
I created a new entity that is empty which has an association to the entity that is displayed in my list view named purchases. The created entity also has an association to the user entity in the system module.
My button to skip runs a microflow that creates an object that does the following.
so if you hit the skip button it should add your name to the entity named “edited_by”
then my xpath constraint on the list view is as follows.
When i run the app my data is still showing up, but my skip button does not change anything. So im assuming my issue is with my microflow and not my xpath constraint.