Loading

How to sort and download the data of Admin Insights data source when querying the view data using REST API: Query View Data

Date de publication: Aug 25, 2025
Tâche
How to sort and download the data of Admin Insights data source when querying the view data using REST API: Query View Data
Étapes
Put the fields to the shelf then query the view data using REST API: Query View Data.
User-added image

The sort order of the query result is not the order in the shelf but alphabetically sorted within the shelf.
If you want to control the sort order of the query result data, for example, you need to rename the field and to number them.

Note that if the field is time series, the name will automatically contain "Seconds of" or something like that at the beginning of the field and this might get the sort order unexpectedly changed.
User-added image

User-added image

In order to avoid this (to get rid of "Seconds of" in the field name), you can use calculated field and STR function to change the time series data to string data like below.
  • STR(<field of time series>)
User-added image

 
Numéro d’article de la base de connaissances

001458757

 
Chargement
Salesforce Help | Article