Many to 1 User database link

Hi all,

I wanted to ask for help on this problem. Currently I am trying to link users to a hospital (via a many to 1 relationship) but can’t workout how to get this working. Essentially when the user first logs on they need to enter a code which is equivalent to any hospitals code. If they get the correct code the user is assigned to that hospital. Why can’t I do this when I have the many to 1 relationship set up. I’ve attached a picture for context.

Regards,
Eddie

You’ll need to put the button that links the hospital within a list of hospitals with a filter where “code” is equal to your input field where the user enters the code with a maximum number of items set to 1. Add an action to update the current hospital to add the logged in user to the relationship.

Once the user enters the exact code and you have the list of hospitals, the button will appear.

Also, on the list, set the visibility to sometimes visible if Input is not equal to empty.

1 Like

Yes amazing thank you.