Static Content in Search Constraints?

I’m trying to reference a database field through the “Do a search for” command, and then adding text into the search constraints, but it appears to only allow me to enter dynamic data. I’d like to specify that the data type “Role” not equal the text “Requester”. Is that possible, or am I going about this the wrong way?

It’s looking for a Role record value. You wouldn’t be able to enter in text because Bubble doesn’t know which text field to search against - you could have more than one.

You can do:

Role <> Search for Roles :first item, where the Role search has a constraint: Role text = Requester

2 Likes

Thanks @romanmg, that works for this!

Another question, what if I want to eliminate Roles based on a yes/no field within the Role data type? For example, if the Role has a yes/no field of “Requester Only” and the item returns a “yes”, I’d like to exclude that in the search constraint. Having trouble with this one.

You can apply the same principle.

Role <> Search for Roles :first item, where the Role search has constraint: Requester Only = yes

But what if there are multiple Roles with Requester Only = yes, and I want to exclude all of them in the search constraint? Then I would want more than just the first item, correct?

Oh I see. Then do “Role isnt in Search for Roles” with constraint on role search: Requester Only = Yes

The “isn’t in” changes it a bit so that you’re now excluding anything found within a list.

Thanks so much, you nailed it!

1 Like

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