Hi Androsh,
if you are comfortable with SQL I would use SQL otherwise you could use a BPS internal view. Either one could be used in a "Validate form" action.
In general I would do something like "Count the number of workflow instances which reserve the swimming lane in the same time frame and is not the current instance. ". If the number is 0, then everything is fine.
If the swimming lane is a workflow instance and not an item list row it would be something like:
select Count(*)
from
(
select WFD_ID, WFD_STPID,
from WFElements
where WFD_DTYPEID = SwimmingLaneProcesses
and WFD_ID <> 'CurrentInstanceId'
and WFD_SwimmingLaneField = 'SwimmingLane'
and
(
(WFD_AttStartDateField between 'Start Date' and 'EndDate) or
(and WFD_AttEndDateField between 'Start Date' and 'EndDate)
)
)
as OtherRowsUsingTheSwimmingLane
This could be used as a SQL Command in the Validate action and compare the result against >0
Alternatively you could directly return True (1) / False (0). For some reason I prefer the "Count" variant, maybe because we can switch the "SQL Command" with "Data source Value".
Best regards,
Daniel