Action button : filtering displayed options

Hello there,

I’m building a portal for companies, so that they can register their employees for the training courses we offer.

I post sessions, and they can use an action button to register employees attached to their company.

I have no problem filtering and displaying only their employees to each employer (including the choice of person to register via the action button), but I do have a problem with multi-company sessions. I can have a training session with employees from several companies, and in this case, when an employer wants to update the session registrations, he can only add people from his company (which is the expected behaviour), but he can also display (and more importantly, remove) employees from other companies.

On my screenshot, you can see how the form behaves: the employer only has the choice of adding people from his company, but he can see people not attached to his company who have previously been registered for the session:

In build mode, I’ve filtered according to the employer (I can attach only one media in my message, but the filter is functional given the choice of employees in the form)

Perhaps there’s an additional filter that I’m not aware of?

Thanks for your help!
Jean-David

Hey @Jean-David :wave: Thanks for the detailed question.

Are you using permissions in this setup?
It would seem to me that you should be preventing any company seeing a user from another company, would that make sense?

Then the field you’re editing would only show the users in your own company, and you would only be allowed to remove (or add) users in your own company.

Hi Darragh,

Thanks for your answer :wave:.
Well, it completely makes sense when you say it, but I’ve tried a lot of different things and can’t figure out how to reproduce my filter using permissions.

I would ask that the name of the person’s employer be included (as some employees work for several companies in parallel) in the name of the company represented by the employer. This works well. But I’m having a hard time with the permissions: I’ve tried a trick based on the emails, trying to establish a link between the employee’s employer email and the employer’s company email, but I seem to be completely lost!

Here’s a screen of the filter followed by what I’m trying to do with the permissions: (in fact, with the filter I have the impression that I can start from the value of the cell, but I’m obliged to start from the user with the permissions without being able to go back to the cell - I don’t know if I’m making myself clear :sweat_smile: )

Happy to help @Jean-David

We usually reccomend using a linked field over text, that way you can do something like User is one of Employee > Users

With the permissions, the left side is the record, and the right side is the user values, but you should be able to bridge them.

If you want to send me a link to that permission rule I can make a suggestion

Sure @darragh it’s here : https://portail.1901-formation.fr/_/data/internal/user/permissions/22531

Here an example of how it’s setup inside airtable (sample setup using the screenshots I’ve posted so far, with an added description column to make it completely clear) :

Thanks for sharing!

What table are you trying to filter/setup permissions for?

The table you’re applying permissions to (in the link you sent me) is the User table, which doesn’t exist in Noloco.

I would suggest it would be the ‘Employee’ table, or whatever that is.

Based on your User list I would say it’s your Apprenants table

This is what the filter would look like, I think

https://portail.1901-formation.fr/_/data/internal/formationsLonguesApprenants/permissions/22567

(note I have disabled the permissions on that table until you’re happy with this)

Thanks a lot for the help ! Actually, what I missed was the table selection at the beginning, didn’t realised I was limiting myself to the user table… Basic, but I missed it :sweat_smile:

After a couple of trials, the right setup is this one :

I should have discovered permissions earlier, shame on me, far more simple now :smiley:

Thanks again @darragh

1 Like