XPath Constraint - Data not displaying

0
I’m working on  the first challenge from https://academy.mendix.com/link/modules/221/lectures/1735/4.7-Additional-Challenges.   Make a dashboard of requests with no approver assigned. Write a microflow that allows managers to claim these requests for themselves. I tried the following, just as what the course instructed earlier: "Using the XPath data source, constrain the data using the following XPath [not(VacationManagement.VacationRequest_Approver/Administration.Account)] This XPath will return a list of all the VacationRequest objects that have no value set for the association VacationRequest_Approver. These requests are all the ones that have no Manager assigned as an approver.”     But the data doesn't show up if I log in as manager.   Did I miss something here? Also I was wondering why would they use not() instead of empty here?    Thank you.
asked
2 answers
0

Couple of questions:

  1. Do you actually have VacationRequest objects in your database that do classify as not having any approver yet?
  2. Is the security set on, and if yes, have you configured the correct access rights for the manager role?

 

As to answer you question as to why not() is used instead of empty: It's not valid!

If you try:

[VacationManagement.VacationRequest_Approver = empty]

You will get an error saying that “you can't compare an association with empty” 

And if you try:

[VacationManagement.VacationRequest_Approver/Administration.Account = empty]

The error message “Incompatible expression types: Boolean, (empty).” will appear.

answered
0

Hello whenever an Approver account has been assigned to VacationRequest then you will set this assocaiation VacationRequest_Approver right.

 

So just check this association VacationRequest_Approver  does empty to not.

Something like this [VacationManagement.VacationRequest_Approver/Administrator.Account= empty]

 

Hope it helps!

answered