Hi All,
I am trying to build an app where leaders can register users for training classes. I have a sharepoint list with all users that are eligible to be registered. I have another sharepoint list with the available sessions. Each session has a number of in-person slots and virtual spots. When someone is registered I need to pass the date selected for their session through to the list of users to log what session users have been registered for, but I also need to figure out how to log how many seats have been taken per session and how many are still available. I am running into a brick wall and I really need a fresh pair of eyes to tell me what I might be missing here.
Right now I have a lookup column in my Sharepoint list with the training sessions tallying up the count that a date is occuring in the "registered for" column of the list of all users, so I can see for example that 18 seats are full. However I can't reference that lookup column in Power apps to tell users of the app how many slots are still available for a session. I need to make registration for a session close after it has reached 20 in-person registrations and 5 virtuals.
I have figured out and tested every part of the app functionality and it all works except for figuring out how to make a session unable to be selected once the max number of registrations has been reached.
This is the gallery where a leader would select which session to register their user in. I want to report in the gallery "In-person seats available" and "virtual seats available". I would then make the "Register" button invisible when the seats available reach 0, and change the "status" to "closed, max registration reached."
Most of the app is feeding into a master list of users, so when a leader successfully registers a user for a session, the session start date is updated in that sharepoint list. I need to tally how many of those users are registered for a session and subtract that number somehow from the total available slots. I also need to take into consideration whether a registration is virtual or in-person.
I can't figure out how to do this with formulas within the app without running into delegation issues and Power Apps won't recognize my lookup columns in Sharepoint. I have these columns but SeatsFull is a lookup column that is feeding from my list of all users.
It is doing a "Count Related" on a lookup I have in my list of all users (conversely listing sessions from this list over to that one. So when I select a session there within that lookup column (RefSD - Reference Session Date), the column in this list is tallying them up.)
So I have *kind* of figured out how to total up the number of registrations I have per session but I can't figure out how to pass them back to the app.
Please give me any ideas you can think of! I don't fully understand how to create tables and collections in Power Apps but I have wondered if that might be the key somehow to my problems?

Report
All responses (
Answers (