Using a value to lookup an item in a different database

Hi guys, Bubble/ Javascript newbie here. I currently have 2 databases, one (Users) hosts all of the User information including some real estate information and a field that identifies what state they live in (CA, UT, NY, etc.)

The other database (Appreciation) houses a list of real estate data and only has two fields, one of which is a state identifier (CA, UT, NY, etc.) the other field holds a list of rates.

Using the Toolbox plugin, I’m trying to tell Bubble that if a User has listed CA as their state, then go fetch the list of rates tied to the CA value in the other Database. Thus far though I’ve had no luck. Among other things I’ve tried Search for Appreciation’s: first item’s list with the constraint that Appreciation’s identifier = Current User’s State, but that didn’t return anything. Any help would be appreciated!

Hi @jake.jensen,

I think you got it right, it does work when you do a search for appreciation: first item’s rates with the state as constraint. I just checked it out.
ezgif.com-gif-maker (1)

the set up:

2 Likes

@hanan1,

Thanks for your help. I’m closer to a solution, but am obviously still doing something wrong. I think my issue lies in the Data source section of the RepeatingGroup Rate. In your screenshots you have it looking for first item’s “rates”. I assume “rates” is a field within the Appreciation table designed to look up values in the Rates table, is that correct?

If so, how did you accomplish that? I tried something similar with a field called “Appreciation Values” but it obviously isn’t performing the lookup.






@hanan1 I solved the issue.

I wasn’t aware that things created previous to the creation of the composite field needed to have their values manually entered. So it was a fairly easy fix. Thanks again for your earlier help!

1 Like

I am glad it worked! good luck with the rest :slight_smile: