Attributes

Overview

When referencing an attribute, use the attribute API name (Attribute_API_Name__c). The Data panel on a template displays the list of all available attributes with their corresponding API name. Shibumi automatically appends __c to the API name upon creation of custom attributes.

To reference an attribute from another template in the solution hierarchy (i.e., an ancestor template), the expression syntax is: Template_API_Name__t.Attribute_API_Name__c

Data Sets for Date and Number Attributes

Data sets can be enabled for custom Date and Number attributes upon creation or edit of the attribute. Upon enabling data sets for a date or numeric attribute, all app-enabled data sets will be available for calculations, editability rules, or storing manually-entered values. For more detailed information, please refer to our article on Creating and Editing Attributes from the Data Panel.

Data sets for Date and Number attributes can be referenced using the expression language.

  • To reference enabled data sets for Date and Number attributes, append the data set’s API Name (e.g., Date_Attribute__c.actual__d, Number_Attribute__c.forecast__d, etc.)

Note: Unlike Metric data sets, data sets for Date and Number attributes do not require a timeperiod() to be referenced.

Referencing the Value from a Name/Value or Icon/Name/Value Attribute

Name/Value and Icon/Name/Value attributes are unique in that they hold multiple components: a name, a value, and an icon.  Name and value can be referenced using the expression language.

  • To reference the Name, the syntax is the same as a reference to any other attribute, i.e., by referencing the attribute API name (e.g., nv_attribute__c)
  • To reference the Value, append .value to the attribute API name (e.g., nv_attribute__c.value)

Note: the value can be either a number or text. The expression syntax is the same but, in a comparison expression, if the value is text, the content to which it is being compared would need to be enclosed in quotation marks (e.g., nv_attribute__c.value = “approved”).

Updated on September 10, 2023

Related Articles