Filtering by fields

I want to filter a database using dropdowns. I have a dropdown that has the title values, and for this no problem. But i have a second dropdown that has the fields values. Is there a way i can make it variable ? (when the selected value in dropdwon2 is mercedesClassV, filter the already filtered dataset to retrieve the right price) !

// API Reference: https://www.wix.com/velo/reference/api-overview/introduction
// “Hello, World!” Example: https://learn-code.wix.com/en/article/1-hello-world
import wixData from 'wix-data';
$w.onReady(function () {
    $w("#input1").value = "Paris"
});

export function button10_click(event) {
 Estimate()
}

export function Reset() {
    $w("#group1").hide()
    $w("#dataset1").setFilter(wixData.filter())
}

export function Estimate() {

    $w("#dataset1").setFilter(wixData.filter().contains('title', $w("#dropdown2").value)).then(() => {

 
 let itemObj = $w("#dataset1").getCurrentItem()
 let field = $w("#dropdown1").value
$w("#text30").text = itemObj.field

        $w("#group1").show()

 })
}

here i tried to set the field value to the “field” name, but i think that putting “field” after “itemObj” will just look for the “field” field in dataset (which doesn’t exists)


site web : ACCUEIL | My Site 2 (wixsite.com)

May be the fabulous @Yisrael (Wix) of the awesome @russian-dima have answers !

Not sure if you are searching for something like this here…paralell running post…

You are using a REPEATER and in the example i am using a TABLE. Both ways are possible!

Yeah i know it is working with tables (with .rows and .columns), and for sure repeaters, but how can we retrieve the infos in certains columns trought dataset ? or wixdataquery ?

I watched closely this example : WIX - Dataset Filtering Multi Column Example (wixsite.com)

And i think there is something to do with multifiltering… But what ?

My idea of transforming itemObj. field may not be possible…

I had another idea where i could filter column in a hidden tables, then retrieve the data… but it doesn’t look clean at all for the code !

There should be something cleaner via code…