Hello Shirjay,
To validate this you can create a validation microflow and build there your specific logic for validating.
Please checkout this learning path:
https://academy.mendix.com/link/modules/95/lectures/784/8.3.2-Build-Validation-Checks
In your case you need to know if the resource is not already occupied to an allocation with a start and end date:
- probably you need to retrieve if there is already an allocation for the resource on the given dates
- you can use a database retrieve action and within your xpath you need to make sure you only retrieve the associated objects of allocation to resource, furthermore you need to specify your date requirements, probably something like this:
Associated with resource
and
currentAllocation/startdate <= Enddate
and
currentAllocation/enddate >= Startdate
- if that returns empty you have a valid allocation if this is not returning empty then you have a conflicting allocation
Good luck!!!*
I hope it helps