Reporting on field sets
In your reports, you can specify a field set so you don't have to list fields individually. For example, if you wanted to refine your query using HCP focus areas, you can specify All HCP Focus Areas in the basic report builder or
hcp_focus_areas in the SQL editor; this value includes all 36 fields (
hcp_focus_area_36__v) in that set.
The following table contains all of the groups you can specify, along with their corresponding SQL field names and the individual fields that are included.
|SQL Field Name
|Data Model Fields
(Note: These fields are not considered a set for Japan).
|All Address Lines
|All Alternate Names
|All Delivery Address Lines
|All HCO Focus Areas
|All HCP Focus Areas
|All Medical Degrees
|All National IDs
Simplified query using field sets
In basic reporting queries, you can select a single field to represent all fields in a group by selecting it in the Field drop-down list in the Filters section for the query. Each field set includes an item in the list prefixed by All to represent all fields in the group; for example, All Specialties, All Emails, and so on.
Using the SQL query builder, you can specify a single field (for example,
specialties) to represent multiple fields (for example, specialty_1__v, specialty_2__v, and so on).
When you specify a single field; for example,
specialties, the results will include values from all fields in the set.
select specialties from hcp where specialties in (‘FM’)
This example will return results that include FM (Family Medicine) in any field in the set (that is, from specialty_1__v, specialty_2__v, through specialty_10__v).
Use the EXPLODE operator
In the SQL query builder, the EXPLODE operator performs an aggregate function on sets of numbered fields.
The following example shows how to use the EXPLODE operator with the specialties fields. For more information about this query, see HCP number of specialties.
A similar query without using the EXPLODE operator has different results.