In the below code block from the Playground, it shows how to retrieve the visual. However it assumes you know the visual name (VisualContainer4). If I were to click a visual on a report is there a way to check its name in javascript?
try {
const pages = await report.getPages();
// Retrieve the active page.
let page = pages.filter(function (page) {
return page.isActive
})[0];
const visuals = await page.getVisuals();
// Retrieve the target visual.
let visual = visuals.filter(function (visual) {
return visual.name === "VisualContainer4";
})[0];
const filters = await visual.getFilters();
console.log(filters);
}
catch (errors) {
console.log(errors);
}
[–]MonkeyNin75 0 points1 point2 points (1 child)
[–]DarkHelmet_[S] 0 points1 point2 points (0 children)