Hello again
I read your comment
What you can do is adding a boolean attribute called “isBooked” to your room entity and have the default value as false.
Then in the same xpath constrain you can check for it like
[AdultsCapacity >= $Booking/NumberOfAdults
and
ChildrenCapacity >= $Booking/NumberOfChildren
and isBooked = false()]
Then make a custom save functionality using a microflow
And call it as the on click action instead of the default save button
In this newly created micro flow
Add a change object activity to change the Room object and set its “isBooked” to true
Hello Sanjay,
Your domain model looks fine
But first you need to have Room objects ready
So create some rooms with capacities and all
Then in your New Booking page:
Add a reference selector widget to select a room
in the properties of the reference selector
go to the Selectable objects tab and use the xpath constrains, similar to
[AdultsCapacity >= $Booking/NumberOfAdults
and
ChildrenCapacity >= $Booking/NumberOfChildren]
*Use Ctrl+Space to help you with xpath