Query data from #dataset1 based on particular value.

let orderNumber = order.number.toString();
$w.onReady( () => {
$w(“#dataset1”).onReady( () => {
let itemObj = $w(“#dataset1”).getCurrentItem();
console.log(itemObj)
} );

} ); 

I want to query rows that have the value of orderNumber.
We can query data from Data collection, but how to query data from dataset?

When you talk about from Data Collection, you are still getting that info from a dataset.

Dataset, collection, database all the same thing, just people will prefer to call it something that they are used to.

So your answer is the same as in previous questions you have previously posted here.
https://www.wix.com/corvid/forum/community-discussion/use-variable-in-eq-for-querying-the-data-do-not-work
https://www.wix.com/corvid/forum/community-discussion/not-able-to-get-data-from-orders-collections

I can get data using whatever you are suggesting in this and previous replies, but only when we run in preview site.

But when I publish my site and use in live, the data that gets stored in orders collection, we cannot query the data at that time bcoz it has only admin permissions and so the data query on it do not works during live website.

So instead of putting same links, I am asking if there is any better way to query the data from orders collection during live website

@givemeawhisky We can query from orders collection only if we are in preview site as we are the admin, and the permission are read only for admin,

But when we publish our site, and login as some other users, querying the orders collection on background is not possible.
So this is my question, how to get data from orders when not as admin?

You can’t, exactly as stated in the collection page.

Permissions

The Order collection has the following permissions :
Read: Admin
**Create: ** None
Update: None
Delete: None

You can try Wix Data Options and try suppressing the permission checks and hooks from running on it.
https://www.wix.com/corvid/reference/wix-data.html#WixDataOptions

Otherwise invite somebody to be a contributor on your site like here.
https://support.wix.com/en/article/about-roles-permissions-contributors

When somebody buys something on your site, they will get their order info.