Filter widgets types
Hi all,
Trying to figure out how to filter widgets based on their types. For example, let's say we have 50 dashboards where each has 7 widgets. Question is is there a way to filter out based on the type widgets (i.e n amounts of bar charts, n amounts of pie charts, etc)
Problem arises with widgets that are using certain type which will soon become deprecated, thus need to change all widgets that are currently set with this type. One way is of course seeing one by one which is broken, however if possible I would like to avoid this and change all widgets that will soon become problematic to another type.
Thank you
martinangelov
Posted 1 year ago·Last reply 1 year ago
6 comments
Jake Raz
·1 year agoMaybe try exporting all the dashboards as ".dash" files? These can be examined/edited in any plaintext editor like Notepad++, so presumably you could do a control-F (find) for the widget types in question. The challenge would be doing this in a timely manner. If you're using Notepad++, you could try opening all of the dash files at the same time, then using the "Find All in All Opened Documents" option, but this might not be very feasible if you have a ton of dash files. Aside from that, though, I'm not sure of an expedient way to search them all quickly; worse case, you'd have to check each file individually, but if you're doing that then you might as well just open each dashboard one-by-one directly in Sisense 😛
martinangelov
OP1 year agoHi Jake_Raz ,
Thank you for your input. Have started doing it the way you proposed while in parallel looking into the suggestion on retrieving the widgets types by API.
Assaf Hanina
·1 year agohey martinangelov ,
I’m sharing the information provided by the CSM to summarize the suggested solution.
The recommended API endpoint is 1.0 GET/dashboards/{
dashboardId}/widgets. This endpoint provides details on each widget, including the widget type, for the specifieddashboardIdProposed Script Solution Workflow:
dashboardId.oid,title,type, andsubtype.dashboardIdin the list.Example Output
Best Regards
DRay
·1 year agoHi martinangelov,
Thank you for reaching out. You can use the API to retrieve widgets by chart type, https://sisense.dev/guides/sdk/modules/sdk-ui/type-aliases/type-alias.ChartType.html. If you need technical assistance, please let us know and we can find someone to work with you.
I hope that helps. Please let me know how things go.
Have a great day!
martinangelov
OP1 year agoHi DRay ,
Thank you for the response, if possible some steps on how to do it would be much appreciated.
Thank you
DRay
·1 year agoHi martinangelov,
I reached out to your account team to have them connect you with a technical resource.