Dropdown to filter out data - data set & collection permission

Hi…
I’m new here. I have a website, where I want to filter data: https://jeproservicegmbh.wixsite.com/meinewebsite/Properties
For example just showing Houses or Villas (by dropdown).
It works on preview, but not on the live-website.
I read in blogs, that it can be a problem about data set & collection permissions. Still did not found the problem:

  • data set is set to: Read & Write

  • collection permission of the database is set to: everyone can do everything
    Can anyone help me to solve this issue?
    Thanks a lot,
    Roland

Hello.

Dataset permission should be Read-Only since you are not using this dropdown to update the contents of your database. You should also enable the option to connect a list from a database as shown below:

If the issue is only occurring on the live site as you say then you need to sync your sandbox to the live database .

Remember to set your dropdown to be enabled by default via the properties panel .

Good luck!

Hi Sam
Thanks a lot for your answer!!! I tried everything:

  1. Dataset permission is on read-only

  1. option to connect a list from a database is set to Property Type (Text)

  1. Sandbox is synchronised

  1. Dropdown is enabled by default via

Result: https://jeproservicegmbh.wixsite.com/meinewebsite/Properties

  • When clicking the Button, the list get filtered

  • But it is not possible to change the selected item in the dropdown

import {wixData} from 'wix-data';

export function button1_click_1(event) {
 //Add your code for this event here: 
$w('#propertiesDataset').setFilter(wixData.filter()

        .contains("propertieType",$w('#dropdown2').value))

    .then((results) => {
            console.log("Dataset2");
            $w("#propertiesRepeater").data = results.items;
        }).catch((err) => {
            console.log(err);
        });
    $w("#propertiesRepeater").expand();

}

@roland_pfister You need to remove the main dataset connection so that the chosen option is empty:

You will notice that your dropdown options may contain some duplicate values. To remove duplicates, use code to build your dropdown options by following the example here: https://www.wix.com/corvid/example/search-a-database

Good luck!

@samuele worked! Great! Thanks a lot!