Problem comparing 2 different lists

Hello forum!

I have a problem comparing the values of a MultiDropdown with an array of subcategories.

I leave here a image to get more context

So, I have an array of subcategories like this:

[
    {
        "name": "Subcategory 1",
        "color": "#0CBBAA"
    },
    {
        "name": "Subcategory 2",
        "color": "#0CBBAA"
    },
    {
        "name": "Subcategory 3",
        "color": "#0CBBAA"
    }
]

And my dropdown receives values in an array like this:

[
    {
        "subcategories": [
        {
            "value": 1,
            "name": "Subcategory 1"
        },
        {
            "value": 2,
            "name": "Subcategory 2"
        },
        {
            "value": 3,
            "name": "Subcategory 3"
        }
    ]
    }
]

What I need to do is, if a subcategory is selected in the dropdown, filter a list in the repeating group to display items based on the “name” value.

Currently, I’m trying something like this, but I haven’t achieved the desired results, except when I use “:first item.” However, that doesn’t work for me because I need to iterate through all the subcategories.

Screenshot_310

How i can solve this? any examples?
I appreciated constructive replies :smile:

Hey @ignaciocorball1

That’s a tough one. I feel like there is no perfect solution. Maybe try this something like this:

Editor: 805testapp42 | Bubble Editor

Preview: https://805testapp42.bubbleapps.io/version-test/compare_list?debug_mode=true

Screen Recording 2023-05-18 at 3.04.55 PM

Is this what you are looking for? Let me know. :blush:

1 Like

That is indeed a good solution, @J805, but currently I am working without a bubble database. All endpoint calls are made through the API connector, and data manipulation occurs within the workflow when the button is pressed. :confused:

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