Try to debug your code, by using some console.logs…
$w.onReady(() => {
const dataset = $w("#dynamicDataset");
dataset.onReady(() => {
let xxx = dataset.getCurrentItem(); console.log(xxx)
//const { position , branch } = dataset.getCurrentItem();
//$w("#text250").text = `${position} | ${branch}`;
});
});
What do you get as result for —> xxx ?
Can you create a new —> const of —> the given result? Does it fit?
A currentItem could look like this…let xyz = dataset.getCurrentItem();
xyz = {
"_id": "fcec780a-3e37-4b64-8a66-37c552c53f99",
"_owner": "f6c0f9c3-a62d-7e9f-g58d-943829af244d9",
"_createdDate": "2021-04-01T17:19:03.823Z",
"_updatedDate": "2021-04-01T17:19:10.477Z",
"title": "title",
"position": "xxx",
"branch": "zzz"
}
Now you want to get some values…
const title = xyz.title
const position = xyz.position
const branch = xyz.branch
and so on…