Forum Academy Marketplace Showcase Pricing Features

Searching for equal field

I would like a user to be assigned a field (type: user) when created by doing a search among other data types that have a field equal to his
Could Someone help me?

Hey there. Sorry I don’t fully understand what you are trying to do.

Upon creating a new ‘thing’ you want a field called user to be the current user?

In DB: inside User, create a field called MatchingUsers, and make it a list of users (because more than one can match)

In workflow: after the user is created (for example, after sign up) add a step Change a Thing. What is the the thing to change? Current user. What is the field to change? MatchingUsers. What should it be set to? Do a search for users with constraints based on the fields you want to match. Also add a constraint that user <> current user else the current user will also get added (because they will always match their own fields)

I’m stuck here
The data type “Ospiti” has a field (text type) that it has to search and it should be equal of the text field of the text field of current user

What you have is correct, you just need a little bit more.

In this part:

On the left, you have Sponsor, which expects one value
On the right, you have a Search, which generates a list

You cannot assign the list from the right to the single value on the left, which is why Bubble is marking it in red. That means Bubble needs more information.

You can do 1) xor (exclusive or) 2) below

  1. Tell Bubble which item from the list on the right is be set to the single value on the left. You can do that by clicking the “more” in red color, and selecting :first item (that will pick only the first item from the list, which can now be assigned to the single value on the left) OR
  2. make Sponsor a list instead of a single value, and then add the Search list to the Sponsor list, or set the Sponsor list equal to the search list

I’ve tried but I’ve to write something more :frowning:

@quidsicurezza the result of that search a field which is a list of items? Can you show us the error message it shows on the top right. The triangle says 1 issue. Press that and it will show you whats wrong.

If that one item has sub-fields, you will have to pick over field. What does it show when you click more?

For example, if the list returns Shops, and the first item is a single Shop, but the single item (“Thing” in Bubble-speak) can have fields, like Name, Address, etc. So even after selecting that single item, you may still need to specify which field of that Thing is to be used.