Query Results
When you execute a query, results are shown in the bottom panel of the Query Tab as a new result Tab. The following screenshot highlights various parts of the query result.
Refreshing Results
If you want to refresh the results, click on the Refresh
icon, which will re-execute the results and shows the first
batch of matched records. You can fetch more batches using More Batches action.
When you Refresh the results, it re-executes the Query that was initially executed. If you have made changes to the Query in the Builder/Editor, it will not consider that change. If you really want to execute the latest query from Builder/Editor, close the result tab and re-execute again from the Builder/Editor.
Filtering Columns
Sometimes you would query a lot of columns (especially with select *
construct) and you have too many columns to deal
with. You can hide some of those columns by filtering out columns via Filter
(funnel icon). By default, all the
columns will be shown, but you can hide one of more type of columns by selecting appropriate options.
Note about Null Fields
. That option hides a column if and only if all records shown in the grid have null value for
that column. This doesn't take into consideration the batches of records which haven't been retrieved from the server.
Auto Refresh Result
If you are kind of monitoring a data set which is changing, and you want to refresh the results every so often, you can leverage the Auto-refresh Result feature. To enable, click on the Auto-refresh button and select the time interval when the Data should be refreshed. To cancel, click on the same button again.
Data cells formatting
Brobench has deep understanding of all fields included in the SOQL, and it uses that information to format the data as appropriate.
- Null values are indicated by cells with a Grey background
- Id/Lookup/Master Details reference fields are shown as hyperlink and when you hover, it will show the preview
- Date time fields are formatted according to the Brobench or Sfdc Connection user timezone
Result Status
Datagrid shows the status of the query execution and it looks like this. For ex., below status is conveying that there are 19 records matched/fetched, query included 67 fields and Salesforce Query API took 153ms to complete the execution.
Fetching Next Batches
Salesforce returns the first batch of records for a given SOQL. The number of records returned in a batch depends on the complexity of the SOQL, data type of fields and also the number of fields queried. It can return anywhere between 1–2000 records.
Brobench by default shows the first batch of records and shows the total number of records matched in the status field as follows. For ex., below status is indicating that there were 172,947 records matched, but Salesforce returned 250 records in the first batch.
In such cases, Fetch next batch icon should be enabled. Click on the icon to fetch next batch or click on the Dropdown icon next to Next Batch, which provides the list of options to fetch many numbers of batches at a time.
As you fetch the next batch of records, retrieved batches should be added to the same grid so you can Search in Grid or export all fetched rows easily
Export Result
Note that Grid exports only the records that have been fetched from Salesforce. If you SOQL matched 10,000 records but you have fetched only the first of batch 2,000 records, then when you export all records, it will export only 2,000 records.
To be able to export all, first fetch all records and then export.
To Export Data, right-click on the Datagrid, and select Export Other
sub-menu as shown below
There are various options to control what data is exported and target location/format. Select the appropriate Option, which should allow you to either download that file or export to external target like Gsheet.
Copy Data
If you want to copy the data instead of export, select Copy
or one of the available options in Copy Other
.
Viewing Child Query Result
If you execute a SOQL containing a child query, then Datagrid will show those child results as sub-result tabs for each of the child-query, up to 5 levels.
When you select one or more parent records, then child records corresponding to those parent records are shown in child grids. Parent record Id and (Name if selected) will be shown as first column in the child grids. You can edit the child results as you would the main result.
Resize the Result Panels
SOQL Results are shown in resizable splitter which can be adjusted to make Datagrid bigger or smaller. This also works for Child datagrids.
Maximize Result Tabs
You can double-click on a Result tab label to maximize the result so that you will have big real estate to view/edit the data. Double-click again to restore back to its original size.
Pin Result Tabs
By default, a Tab will get re-used to conserve memory if it is not in edit mode and if its Object name matches the query being executed. If you want to keep the tab from being reused, you can pin the tab. There are two ways to pin/unpin the tabs.
Cmd+Click
/Ctrl+Click
the Tab label- Right-click on a Tab label which should show the Tab menu which provides options to Pin and Unpin a tab.
Once a Tab is pinned, Close icon is changed to Pin icon and it cannot be closed until it is Unpinned.