there must be something I am doing wrong here and I do not know what it is!
Did you configure the dataset as write or read-write? If the dataset is read-only it wonât work.
I just changed it to Read and Write. clicked preview, clicked on the button but items are still in the collection
You should understand that using the dataset to delete all records takes some time and you will have to wait. You can try the wixData.query() method which is faster.
because I always come out of preview with out waiting.
You should see the console log output of x repeatedly displayed in the console. You need to wait, you canât just go right out of preview.
If you are unable to figure this out, you might want to check out the WixArena - itâs a hub where you can look for Wix Code (and other) experts for hire.
This is where I am going wrong! I come out of preview.
I have no knowledge of coding. I used to import products to wix store via the import button on the store, but the button is no longer available. So I had to turn to creating every single page using wix code. For someone like me it was very hard. took me moths⌠I did think about speaking to someone at the arena but financially at the moment I am not in a situation to do that. I really appreciate that you are taking time to reply me.
âwixData.query() method which is fasterâ is this the second code you sent me? where do I need to paste this code please?
You can also use the query() code in the button onClick handler just like the dataset code. Itâs faster, Iâm just not sure how much faster.
Ok Sure. Thank you.
Just one one thing please. If you click on this link https://www.stylesweetsmile.com/dress and click on a Store name, you will notice it will take few seconds to go to the store page.
I want to show âAllâ and âStoresâ in one page, but I could not find a way to do this.
So this is what I did:-
Created a Collection for Dresses
- added a Dynamic page under âStoresâ
- Added Buttons on the left and linked each button to the relevant Store
- Linked the first Button âAllâ to and other page I created under âReady to Wearâ Called âDressesâ
- In this page I added a dataset and created a filter to show all dresses and pasted all the buttons from the dynamic to normal page.
is there any other way to show âAllâ and âStoresâ in one page? Thanks
I used the first code to remove all the line from the database but nothing happened. do you have any idea why?
export function button190_click(event) {
wixData.query(âSessionLogâ)
.limit(10)
.find()
.then((result) => {
for ( var i = 0; i < result.items.length; i++){
if (result.items[i] === null ) continue ;
wixData.remove(âSessionLogâ, result.items[i]._id);
}
console.log(âerase doneâ);
});
}
