Hello, Please, is there a way to get the name of a dataset through code? The dataset is already configured in the page editor as #dynamicDataset.
Thank you very much
Do you mean, you wish to search for datasets on the page and get something like:
[“dynamicDataset1”, “dataset1”, “dataset2”] ?
I have no idea why you would like to get that. But you can do it like that:
$w.onReady(() => {
let pageChildren = $w("#page1").children;
let datasets = pageChildren.filter(e => e.type === "dataset");
let datasetName;
if(datasets.length > 0){
datasetNames = datasets.map(e => e.id);
}
})
If you don’t get the dataset id but the collection name that it’s connected to, I don’t think you can do it with Velo.