Filter Search Results by a Custom Data Type

Hi,

we are somewhat new to Bubble and would like to search for a record that has a custom data type

Here is an example where we would like to search for John’s weight goal…

24%20PM

So to do this I created a text element on the page and am trying to load it with dynamic data

So first step is to search for Goals for Current User


So at this point I have the Goals for the Current User and want to filter the goals for the Weight goal

so I filter on the field name Goal Name (where the field Goal Name is a custom data type called Goal Type)… so I know that I am assuming that the filter criteria needs the Unique ID for the Goal Type with the name of Weight… so I do a search of the Goal Type data type for that Unique ID with a Goal Type Name = Weight



and then I return the Goal Value


53%20PM

But when I run (preview) the page, nothing is found

For reference here are the data type definitions for User, Goal, and Goal Type

19%20PM
39%20PM
50%20PM

Any insight is very much appreciated…

thank you :slight_smile:

I figured out the problem…

needed to add :firstitem to the constraint clause for Goal Type

thats it :smile:

1 Like