Complex variable types are unique to Salesforce, for example, sobject, sobjectField. Use them to query the org for access to data from Salesforce objects. Scroll to the right to view example values. Examples for each type appear below the chart.
SobjectType
References an sObject within your org.
1"variableType" : { "type": "SobjectType" }
SobjectType Example
1"AccountObjVariable": {2 "label": "What object do you use to represent accounts?",3 "description": "The default is the Account object. If you use a different object, select it from the list below.",4 "variableType": {5 "type": "SobjectType"6 },7 "defaultValue": {8 "sobjectName": "Account"9 }10}
The dataType limits values for sObjectField. For example, specify xsd:double to limit the list of fields to numeric sObject fields only. See Primitive Data Types in the Salesforce Object Reference for more values for dataType.
SobjectFieldType Example
1AccountObjFieldsVariable" : {2 "label" : "Which field in the Account object do you use to track annual revenue?",3 "description" : "The default is the AnnualRevenue. If you use a different field, select it from the list below.",4 "variableType" : {5 "type" : "SobjectFieldType",6 "dataType" : "xsd:string"7 },8 "defaultValue": {9 "fieldName" : "AnnualRevenue",10 "sobjectName" : "{{Variables.AccountObjVariable.sobjectName}}"11 }12}
1"ConnectorVariable" : {2 "label" : "Select a connector",3 "description" : "A connector that exists in this org.",4 "variableType" : {5 "type" : "ConnectorType",6 "connectorType" : "SalesforceExternal"7 }8}
DatasetType
References a dataset within your org.
"variableType" : { "type": "DatasetType" }
DatasetType Example
1"DatasetVariable" : {2 "label" : "Select a dataset",3 "description" : "A dataset that exists in this org.",4 "variableType" : {5 "type" : "DatasetType"6 }7}
DatasetDimensionType
References a dimension within a dataset. Use to let app creators select dataset dimension fields to populate app dashboards. Requires that a DatasetType variable is set so datasetId is referenced at runtime.
1"DimensionVariable" : {2 "label" : "Select a dimension",3 "description" : "A dimension from the selected dataset.",4 "variableType" : {5 "type" : "DatasetDimensionType"6 },7 "defaultValue" : {8 "datasetId" : "{{Variables.DatasetVariable.datasetId}}",9 "fieldName" : ""10 }11}
DatasetMeasureType
References a measure within a dataset. Use to let app creators select dataset measure fields to populate app dashboards. Requires that a DatasetType variable is set so datasetId is referenced at runtime.
"variableType" : { "type": "DatasetMeasureType" }
DatasetMeasureType Example
1"MeasureVariable" : {2 "label" : "Select a measure",3 "description" : "A measure from the selected dataset.",4 "variableType" : {5 "type" : "DatasetMeasureType"6 },7 "defaultValue" : {8 "datasetId" : "{{Variables.DatasetVariable.datasetId}}",9 "fieldName" : ""10 }11}
DatasetDateType
References a date within a dataset. Use to let app creators select dataset date fields to populate app dashboards. Requires that a DatasetType variable is set so datasetId is referenced at runtime.
"variableType" : { "type": "DatasetDateType" }
DatasetDateType Example
1"DateVariable" : {2 "label" : "Select a date",3 "description" : "A date from the selected dataset.",4 "variableType" : {5 "type" : "DatasetDateType"6 },7 "defaultValue" : {8 "datasetId" : "{{Variables.DatasetVariable.datasetId}}",9 "dateAlias" : ""10 }11}
DatasetAnyField
References any type of field within a dataset. Use to let app creators select dataset dimensions, measures, and dates to populate app dashboards from a single list. Requires that a DatasetType variable is set so datasetId is referenced at runtime.
"variableType" : { "type": "DatasetAnyField" }
DatasetAnyType Example
1"AnyFieldVariable" : {2 "label" : "Select any field",3 "description" : "Any field from the selected dataset.",4 "variableType" : {5 "type" : "DatasetAnyFieldType"6 },7 "defaultValue" : {8 "datasetId" : "{{Variables.DatasetVariable.datasetId}}",9 "fieldName" : ""10 }11}
DateTimeType
References a time and date. Can’t be used in non-VisualForce page in ui.json. Value must be an ISO 8601 formatted date time string, as per RFC 3339, section 5. For example, 2020-02-19T14:31:42-0700.
"variableType" : { "type": "DateTimeType" }
DateTimeType Example
1"dateExample" : {2 "label" : "Select a date",3 "description" : "The date and time",4 "variableType" : {5 "type" : "DateTimeType"6 }7}
ObjectType
References a user-defined object in your org. ObjectType isn’t supported in the UI and referencing it in ui.json results in app creation errors. Use ObjectType for runtime functionality, such as Overrides.
1"DataLakeObjectVariable" : {2 "label" : "Select a data lake object",3 "description" : "A data lake object that exists in this org.",4 "variableType" : {5 "type" : "DataLakeObjectType"6 }7}
The dataType limits values for dataLakeObjectField. For example, specify number to limit the list of to numeric fields only. Valid values are numberstring, date, date_time, or null for all values.
DataLakeObjectFieldType Example
1"DataLakeObjectNumberFieldVariable" : {2 "label" : "Select a numeric field from your data lake object.",3 "variableType" : {4 "type" : "DataLakeObjectFieldType",5 "dataType" : "number"6 },7 "defaultValue" : {8 "objectName" : "{{Variables.DataLakeObjectVariable.objectName}}",9 "fieldName" : ""10 }11}
1"DataModelObjectVariable" : {2 "label" : "Select a data model object",3 "description" : "A data model object that exists in this org.",4 "variableType" : {5 "type" : "DataModelObjectType"6 }7}
The dataType limits values for dataModelObjectField. For example, specify string to limit the list to string fields only. Valid values are numberstring, date, date_time, or null for all values.
DataModelObjectFieldType Example
1"DataModelObjectStringFieldVariable" : {2 "label" : "Select a text field from your date model object.",3 "variableType" : {4 "type" : "DataModelObjectFieldType",5 "dataType" : "string"6 },7 "defaultValue" : {8 "objectName" : "{{Variables.DataModelObjectVariable.objectName}}",9 "fieldName" : "10 }11}
The dataType limits values for calculatedInsightField. For example, specify dimension to limit the list of dimension fields only. Valid values are dimensionmeasure, date, date_time, or null for all values.
CalculatedInsightFieldType Example
1"CalculatedInsightFieldVariable" : {2 "label" : "Select a dimension field from your calculated insight.",3 "variableType" : {4 "type" : "CalculatedInsightFieldType",5 "dataType" : "dimension"6 },7 "defaultValue" : {8 "objectName" : "{{Variables.CalculatedInsightVariable.objectName}}",9 "fieldName ": ""10 }11}
Generated Overrides in variables.json
The variables.json file generated upon template creation contains an Overrides variable for app assets. Overrides are referenced in template-info.json as a conditional for whether assets are created at runtime or not. It’s best practice to edit Overrides. Overrides can be removed as long as all references to Overrides are also removed from template-info.json.