2 RG fields. second one empty until option chosen in first one

Hi guys,
First of all let me say i’m an absolute noob on bubble and i am learning things step by step…

So i’ve been building this app that has 2(two) RG’s one with categories and the second one with sub categories.
subcategories are linked with relevant categories in database.
So i am now having issues. when i preview my page both categories and subcategories populate full lists of items within those 2 databases, but what i am trying to achieve is that categories RG would be populated and subCategories list would only populate with appropriate items linked to those categories when an icon is clicked inside categories RG is clicked.
So what i have done is untick “This icon is visible on page load” and created condition (This item is visible/ when RG Categories Product is pressed), so now RG subcategories empty when previewing and icons shows up only upon pressing icon on categories RG which is correct, problem is that icons only showing up whilst button is being pressed, the moment i release mouse from image icons disappear in RG subcategories.
Sorry if i am not very clear

lol managed to solve it with trial and error way.
my subCategories RG data source was set to search for data in subCategories db.
i’ve changed that to RGsubCategories’s list of product subCategorieses
not sure why, but now subCategories fields are empty and only populates with correct subcategorries when i press appropriate button in Categories RG.

Anyway sorry for wasting time :slight_smile: