List View Visibility

1
Hi, I have a list view with an xpath constraint currently that allows users to only see data that has yet to be “reviewed” by other users.  However, I also want to add a functionality to my list view where a user can skip over the current object in the list and have that object not show up for them anymore, but still show up for other users.  My thought process was to add another constraint to my listview that was something along the lines of [System.changedBy/System.User != '[%CurrentUser%]'] but I am met with the error that system.user is not boolean, its a string value.  What would be a good way to go about allowing users to skip an object in a list but not remove it from other users? Right now my skip button runs a basic microflow that commits the object, but doesnt change anything, it would simply give the object a changed by value of the system user.
asked
3 answers
1

Zach,

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.

answered
1

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.

answered
0

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.

[not(MyFirstModule.edited_by_Purchases/MyFirstModule.edited_by/MyFirstModule.edited_by_User/System.User)]

 

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.

answered