XPath Constraint and/or

0
  In one of my microflows i use a Xpath Constraint to retrieve all objects that meet certain criteria. For example: I would retrieve a list with objects that meet: Status =! Cancelled AND Date = $Searchdate AND Timeslot = Morning OR Timeslot  = Whole Day This raises a question, how does mendix handle this? Does it has some logics that It knows it would like to have the timeslot Morning OR timeslot Whole day? Or do I need to change my XPath Constraint to something else?  
asked
2 answers
3

HI Nick van Drielen,

You can separate your conditions with in brackets Status!=canceled and Date=$SearchDate and (TimeSlot=Morning or TimeSlot=WholeDay)

This will work for you use case. 
let me know if it owkr for you ATB!!

answered
0

Hi Dinesh Kumar,

 

Thank you for the quick response, i changed it and it lookslike it works.

Strange thing still happends, this is my Xpath constrain:

[WorkspaceReservations.ReservationRequest_Desk/WorkspaceReservations.ReservationRequest/ReservationDate = $NewSearchHelper/SearchDate
and
WorkspaceReservations.ReservationRequest_Desk/WorkspaceReservations.ReservationRequest/Status != 'Geannuleerd'
and
(WorkspaceReservations.ReservationRequest_Desk/WorkspaceReservations.ReservationRequest/TimeSlot = 'Ochtend'
or
WorkspaceReservations.ReservationRequest_Desk/WorkspaceReservations.ReservationRequest/TimeSlot = 'Ochtend_en_Middag')
]

 

When i got a reservationrequest with the status is don't want to have in my list (!= Geannuleerd) it stil shows the reservations in the output list of my request, unless i delete them from my database.

Do you have clue i did wrong?
 

answered