Support not responding (Premium Subscriber)

Hi Dear,

i am really very disappointed with wix support as I have been sending emails for few days and they are not responding although I have a premium membership account with yearly advance payment.

my problem is that wix displayable table does not have filtering and sorting option or maybe i am not aware of it, however i have written a code to create such action but my code is not good enough to pick the dropdown value could you please check the code

code and screenshot below

import wixData from ‘wix-data’;

// For full API documentation, including code examples, visit Velo API Reference - Wix.com

$w.onReady( function () {
//TODO: import wixData from ‘wix-data’;

});

export function AreaButton_change(event) {
console.log(“filtering to area”);
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘location’,valueOf(‘AreaButton’)))
}

Hey
Wix Support does not handle Wix Code that good. Your code is not working because you get the value from the dropdown the wrong way. It seem you confuse Wix Code with pure Javascript maybe. I sincerely recommend you to read about Wix Code Basics. As you will find a lot of knowledge in the menu on top of this page as well as a lot of videos on Youtube where your issues is talked about.

The working code should look like this

export function AreaButton_change(event) {
    console.log("filtering to area");                                                $w('#dataset1').setFilter(wixData.filter().contains('location',$w("#AreaButton").value));
}

You read out the value from Dropdown using

let selectedValue = $w("#AreaButton").value;

Hope it helps and if it does please mark my answer as Top Comment as it helps others to find this.

1 Like

awsome and great it worked for me
can you please also give me any code to filter the table tabs in ascending and descending manner
i placed a shape on table tab (location) (id: areasort) and I tried a code

export function areasort_click(event) {
console.log(“sorting of location”);
$w(‘dataset1’).setSort( wixData.sort()
.ascending(‘location’))
}

but it says .set sort is not a function

sorry i am not a developer or programmer but i will surely try to learn from the provided resources

thanks

@zonaibnajaf Hey, try this but any other questions please use the search function in this forum first, there is a good chance you will find a solution there. Or post them as new posts.

export function areasort_click(event) {
   $w("#myDataset").setSort( wixData.sort()
    .ascending("location")
  );
}

If it does not work remember that you must add the import statement to the top of your page like below.

import wixData from 'wix-data';

But I think you already have that because your setFilter worked. Also make sure that the field key is location in your Data Collection so you did not take the fields name instead of the field key.

Sometimes the dataset is not ready for usage and will give you an error. So when working with datasets try wrap your code inside a onReady function for the dataset like below.

export function areasort_click(event) { 
   $w("#dataset1").onReady( () => {
    $w("#dataset1").setSort( wixData.sort() 
    .ascending("location") );
   } );
}

I have the same problem. Support not responding to database error. We have a business to run.

Dont rely on beta software for produxtion :slight_smile:

@andreas-kviby Do you mean the database collection is not reliable since its in BETA?

@auhanlon When software is Beta the true meaning of that label is not reliable for production. Things will change, APIs changes will be published. I have built lots of sites that are in production but we all must know the meaning about the label beta. What is your issues? I might be able to help you.