Difference between revisions of "Working with Lists"

From Explore Analytics: The Wiki
Jump to navigation Jump to search
Line 56: Line 56:
 
To export the list into a spreadsheet format (also known as CSV), simply select "Export this view's data" from the "File" menu.
 
To export the list into a spreadsheet format (also known as CSV), simply select "Export this view's data" from the "File" menu.
  
{{Template:TOC|Exporting and Importing View Definition|Pivot}}
+
{{Template:TOC|Exporting and Importing View Definition|Reporting on ServiceNow Variables}}

Revision as of 22:39, 13 January 2014

Overview

A list shows rows of data in a tabular form. A list is a type of view. It is based on a table and shows table rows that match the filter conditions. It shows data for one or more fields from this table or from related table (by following reference fields).

Each list column corresponds to a field.

Selecting Fields

By default, all the fields of the table are included in the list. You can control this by editing the list:

  • Selecting Fields - in the View Editor, select fields by dragging them from the list at the top to the list of selected fields below. See Selecting Fields.

Ordering Fields

By default, the list fields are in the same order as they are in the table. For example, if the table was created from a CSV File, the fields will be in the same order as they were in the file. You can control the order by editing the list

  • Ordering Fields - in the View Editor, in the selected fields you can change the order by dragging fields name up or down to a new position.

Context Menu

A context menu is a pop-up menu that has options that are applicable in the given context. In the list, when you click on a cell (but not on any underlined text, or touch it on a touch device), you get a pop-up menu with options such as:

  • Show matching - adds a condition to the filter to only show rows with the value of this cell. For example, if you click on "NY" in the "State" column and select "Show Matching", then a condition would be added to only show rows for "NY"
  • Exclude - adds a condition to the filter to exclude rows with the value of this cell. In the previous example, clicking "Exclude" on "NY" will show data for all states except "NY"
  • Display contents - when the contents of a cell is too long and the value is displayed truncated and with an ellipse (...), you can use this option to display the entire content

The context menu can have other options depending on the context. Explore Analytics uses lists to display views, data sources, tables, and more. When displaying views, for example, based on your permissions you may see an option to delete a view.

Sorting the List

To sort the list by a certain field, simply click on the field heading. To change the direction of the sort (ascending or descending) click on the field heading again. To sort the list by more than one field, for example to sort by state and by city, use the Sort button in the View Editor.

Changing Field Labels

By default, the label for each field (the column heading) is based on the field name. You can change it using the View Editor. To do this, select the field in the Selected Fields list and then use the button with the pencil icon to call up the Field settings dialog.

Creating Hyperlinks

You can make any field in the list into a hyperlink. For example, when displaying customer accounts, you can make the account field into a hyperlink such that when you click on an account in the list, it would take you to the account record in your application. Moreover, the hyperlink can include variable parts using any field from the table, even fields that are not shown in the view.

Let's consider an example. In our example, we have a Salesforce.com data source. We wanted to link the "Opportunity Name" field to the Opportunity record in Salesforce.com. In our example, our Salesforce.com server is "https://na15.salesforce.com". In Salesforce, you can hyperlink directly to any record by specifying its id. The id of the Opportunity is the ROWID field of this table. We can use it in our hyperlink even though the ROWID field is not part of our list.

The to insert the value of ROWID (for each row in our list) into the hyperlink, we use the ${ROWID} notation. If we wanted another field, or even a field from a related table we could for example write ${ACCOUNTID.ROWID} to get the ROWID of the account by referencing the ACCOUNTID field on the Opportunities table and following it to the Account table.

Hyperlink.png


Copying to the clipboard

You can copy the value in a cell by selecting it (the entire cell) and then using the browser's context menu to copy to the clipboard. This option is not available on touch devices.

If you need to copy/paste ranges or rows and columns, then a better option is to export the list data into spreadsheet format and then making the selection there.

Exporting List Data

To export the list into a spreadsheet format (also known as CSV), simply select "Export this view's data" from the "File" menu.