Obtaining values from two tables(solved)

I have a table called USERS with two fields:

  1. User Name ( type=text)
  2. User Role ( type=UserRoles)(see below)

so

User Name: UserRoleName
Nick Cutter
George Plumber
John Electrician
Peter Cutter

I also have another table called USERROLES with a single field:

UserRoleName
Cutter
Pumber
Electrician
Manager
Teacher

Now, I want to create a Dropdown that will take only the name of these Users that are cutters from Table USERS

I did this for the dropdown:

Choices style: Dynamic Choices

Type of choices: USERS

Choices source
This is where I get stuck, I’ve used:
Search for USERS and put a constraint
UserRoleName …what do i do there?

It does not let me put text and cant use the unique Id for “Cutter” from table USERROLES

Any help?

Thanks

You can do this with a constraint. You just select the field USERROLES and then = that to Cutter. So it would USERROLES=Cutter.

It doesn’t let me add text, if I do it gives me an error that it should be a user not text

Could you put a screenshot of how you set it up or a link to the editor? I could help with it a lot better with more information.

I believe I know what your problem is and how to solve it. This is one of those tricky Bubble things that takes a while to wrap your head around. Explanation coming right up

I try to enter text and when press enter it gets back on the Click box

in that red box, do a second search. The type should be UserRole. And then constraint by UserRoleName = Cutter.

Here´s what the second search looks like:

image

Now here´s a tricky part, after you complete that second search, your first search will appear in red because you have to select :first item. Like this

1 Like

Thanks Alonso, it worked!

I actually used the unique ID of that field instead of the text “Cutter” just in case I change the name.

Thanks a lot for the speedy response!

you´re welcome!

This topic was automatically closed after 70 days. New replies are no longer allowed.