Hi,
I’m building an app to help allocating employees to cars that can be used to travel at construction site. The key constraint is that a single employee can be assigned only to a single trip, and managers that will be assigning them need to know who is available and who was already assign.
Tables:
Employees
Cars
Availability planning
In the availability planning I have a EnumList with Refernece to Employees with multi selection. So, in my table Availability planning in column employees selected, I can have Employee 1, Employee 2.
This issue I have is how to search for which employee is taken for the day in that column, and also how to restrict selecting these occupied employees for new trips that day.
I would really appreciate your help!
Jacek
Solved! Go to Solution.
Can you please try the below?
Employees[Employee]- SPLIT(SELECT(Availability Planning[Employee], [Booking Date]=[_THISROW].[Booking Date]), " , ")
Please take a look at Vlaid_if constraints
Your valid_if expression for the Employees column in the Availability Planning tabe can be something like
Employees[Employee]- SELECT(Availability Planning[Employee], [Booking Date]=[_THISROW].[Booking Date])
Employees[Employee] constructs a list of all the employees
SELECT(Availability Planning[Employee], [Booking Date]=[_THISROW].[Booking Date]) removes the employees booked on the date where the booking date is same as that in teh current form entry.
Hi,
Thanks, that is actually brilliant. It works, however, only when there’s a single employee selected. The way this works is that after selecting multiple employees, their names appear after the comma in a single cell. Any idea how to deal with that?
Can you please try the below?
Employees[Employee]- SPLIT(SELECT(Availability Planning[Employee], [Booking Date]=[_THISROW].[Booking Date]), " , ")
I’m impressed. It works like a charm. Many thanks!
User | Count |
---|---|
43 | |
30 | |
26 | |
14 | |
14 |