Access Rule With XPATH

0
Hi everyone, I am developing an app which currently has three entities: Incidents, Handlers and Stations. All three of them are connected to each other in this form: So basically, every incident can happen in one station and every handler works in one station. I am trying to program the application that when a Handler logs in and goes at the Incident Overview page, they will see a list of only the Incidents that happened in the station that the they work.    I am trying to make this happen with the help of access rules and XPATH and until now I have come up with this:    Which to my knowledge should work but whenever I log in with some particular user, none of the incidents are being showed even though I specifically added some which correspond to the same station as the user logged in. I have tried different workarounds that didn’t work, also tried to show the logs of the queries in console but they were of no help.    I would like to ask if somebody sees something that I am not doing right or can suggest me some type of material to read that would help me in this direction. Debugging tips would be appreciated as well.   
asked
2 answers
3

The user will need read-rights on each of the three associations.  Check that first.

If the access-rights are ok, then check the xpath one step at the time. Easiest and quickest way is to create a microflow with several retrieve-activities on ‘Incident’ where you play with the xpath, setting any xpath you can think of (like: LostAndFound.Incident_Station/LostAndFound.Station/Station.Name = “SampleStation” etc). Run it locally, set a breakpoint at the end of the microflow and check the results.

answered
0

So after some hours of debugging, found out that whenever I was creating the Handler and Account they weren’t being connected. They reference for Handler_Account was empty. So I made sure for this not to happen and the problem was solved. 

answered