Filtering problem

Hi! I’ve been using Glide for a month or so, but I have a problem. I shall now explain:

I’m currently making an app for assignment of people to projects, with the options of adding them working 80 or 160 hours, with the possibility of spending 80 hours on one project and 80 hours on another.

I’m dealing right now with this:

This person is already in this project, but I haven’t found any way to filter out their name so that I can’t select them again.
Also, this person being already assigned 80 hours to another project, should not have 160 hours as a selectable option, but I have not found a way either.

In your screenshot, are you adding users to the project from the project’s details screen? I’m asking to see if we can have the context of that project.

What I would do is create a custom form.

  • Add a relation to the assignments table from the projects table, and a joined list column on top of it to retrieve all emails that have been assigned.

  • Add a query to the users table, filter by email is not included in this row > joined list column of assigned emails, and use it for your choice component.

  • Add user-specific columns for storing the person you want to assign’s email (I think you have an email entry in there in case the name is not on the list? If so, two user-specific columns for this).

  • Show an error when the “custom email” column has a value included in the joined list column.

  • Add an If-Then-Else column named “final email”. If “custom email” is not empty then return “custom email”, else return the value from the dropdown choice component.

  • Create a relation from that If-Then-Else to the assignments table, and use a rollup to sum the number of hours they have been assigned.

  • Use that rollup value to show/hide the choices for hours to be assigned in this project.

Yes, the path is that you select one project and inside of it’s specifications you have 2 buttons (“Add person” and “Delete person”). When you click Add you have that pop-up screen.

No, I was using the email as an “indicator”, but I deleted it. Now looks like this:
Captura desde 2024-01-17 10-43-14

I’m not using an users table, the email is the “ID” for the person. I added the query in the projects table because I couldn’t found a way to link that query in “Personas” table

That query brings all names that are NOT in that project, but some of them are duplicated.