cancel
Showing results for 
Search instead for 
Did you mean: 

Filter widgets types

martinangelov
8 - Cloud Apps
8 - Cloud Apps

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

6 REPLIES 6

DRay
Community Team Leader
Community Team Leader

 Hi @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!

David Raynor (DRay)

Hi @DRay ,

Thank you for the response, if possible some steps on how to do it would be much appreciated.

Thank you 

DRay
Community Team Leader
Community Team Leader

Hi @martinangelov,

I reached out to your account team to have them connect you with a technical resource.

David Raynor (DRay)

Jake_Raz
10 - ETL
10 - ETL

Maybe 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 😛

Hi @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.

hey @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 specified dashboardId

Proposed Script Solution Workflow:

  1. Generate a list of all dashboardId.
  2. Specify the fields to retrieve in the API call: oid, title, type, and subtype.
  3. Execute a GET request for each dashboardId in the list.
  4. Export the resulting data into a CSV file.

Example Output

AssafHanina_0-1728402903954.png

Best Regards

Assaf