Add a variable to the returned data of listview from xpath with constraint

I want to return a variable in my list view. The reason I want to return this is because I want to show different data depending on values in database. This will also need a conditional statement in constraint itself. I want to check for value if not null then set the variable to this  value. My example is below. This is my XPath Constraint: [not(IsTemplate)] [IsCreated] [AssignedTo_Tasks = '[%CurrentUser%]' or Watcher_Task = '[%CurrentUser%]' or System.owner = '[%CurrentUser%]']   The above code means that when the column assignedto_task has value of current user it means the task is assigned to current user. Also for watcher_task it means that the user is tracking the task same as system.owner it means that the user created the task. My aim is to:(Examle the variable will be role_user) 1. If assignedto_task = current user then role_user -> assignedto 2. If watcher_task = current user then role_user -> watcher 3, if system.owner =  current user then role_user -> createdby 4. if both assignedto and watcher_task = current user then role_user ->assignedto_watcher.     Basically the role_user's value depends on the 3 values, It can be one value can be two value can be 3 values. Question:   1. How to add a variable into a list from data source xpath 2. How to put conditional statement in xpath constraint in database source xpath FYI:   I have been looking for idea on this I even got to this post " " where user " Fedor Klinkenberg " said  " Currently it's not possible to specify conditional xpath constraints. For now, you should use a microflow to open different forms with different xpath constraints. " but it was posted 7 years ago I hope there is solution to this on now.      
1 answers

There is also a possibility to use access rules on the entity with XPATH, in this way it is possible to give the currentuser read access when he is Watcher_Task or read-write access when he has AssignedTo_Tasks or you can give access to some attribute in this entity.