Hello, team.
I have two lists in sharepoint, in one of them people are booking accomodations, but accomodation can contain few peoples and I should get possibility to choose only frees accomodation.
So, as I understand, I should create a lookup column that will be see a date for each column from now to now+1 month and added 1 to column with TotalPeople@Accomodation. After that Power Apps can show in dropdown list accomodations with TotalPeople<MaxPeople only.
That's right? If it is, can I do that in Flow, or I can use some sharepoint instruments?
So,
I have one list, that contain next columns:
Created By
Date of Arrival
Date of Departure
City of Arrival
Accomodation for booking
Another list contains:
City
Staff
Current number of people at accomodation
Maximum allowed people at accomodation
What I want to do:
When someone create an Item in first list, in dropdown list them can see only Accomodations that can satisfy two conditions:
1. Accomodation are belong to city that was choosed in previous dropdown list in same form.
2. Accomodation are have at least one free place (that mean current number of people for all dates between date of arrival and date of departure less than maximum allowed number of people for that accomodation).
So, looks a bit complicated, but I think I can explain all what I want.
Of course, that feature should work continiously, updating one time in a day or when anybody adding/deleting item.
I found something similar in powerapps theme (https://powerusers.microsoft.com/t5/General-Discussion/Check-Date-Availability-for-a-Sharepoint-item-and-then-change/m-p/42729#M17710), and for now looking for most optimum solution.