Available in: Axsy Smart Forms
Smart Form Elements That Support Mapping Configuration
Two groups of elements support mapping configuration:
- Data input elements
- Collective elements
Data Input Elements
Axsy Smart Forms allows the data input elements to be mapped to individual Salesforce object fields. The data input elements types are:
- Numeric Input
- Boolean Input
- Date Input
- Text Input
- Record Lookup
Collective Elements
To support the rich depth of object relationships available in Salesforce, Axsy Smart Forms uses collective elements that allow object-to-object pathways to be established so that any data input elements contained within a collective element can utilise these object pathways. The collective elements types are:
- The Smart Form
- Repeating Sections
- Sections
- Sub-sections
- Loops
The Collective Elements support the following mapping possibilities.
Collective Element | Collective Mapping Relationships Supported | Supports Further Collective Mapping Extension? |
Smart Form | - Data input elements in the Smart Form running record object | Yes, via: - Repeating Sections - Sections - Sub-sections - Loops |
Repeating Sections | - Data input elements in a child object of the Repeating Section object | Yes, via: - Sub-sections - Loops |
Sections | - Data input elements in the Section object - Data input elements in a parent object of the Section object | Yes, via: - Sub-sections - Loops |
Sub-sections | - Data input elements in the Sub-section object - Data input elements in a parent object of the Sub-section object | No |
Loops | - Data input elements in the child object of the parent object | No |
Where multiple Collective Elements are used they must be used in a hierarchical manner from the options available in the table above. For example, a Repeating Section can extend its mapping by the use of a Loop, but not vice-versa.
In the first example below two one-to-many mapping relationships are setup via the use of a Repeating Section and a Loop, both of which support parent to child (one-to-many) relationships.
In the second example below a single many-to-one relationship is setup in the Sub Section. Notice that the Section above it has no mapping, the effect of no mapping being specified is to inherit whatever mapping object applies in the next highest level which in this case is the Smart Form running record.
Configuring Mapping For Data Input Elements
All the Data Input Element types use the same simple mapping syntax, typically this is:
Current_Object.Field_in_the_Current_Object
An example from the Smart Form Designer Mapping tab is shown below.
Remember: Mapping configurations for Data Input Elements MUST always end in a object field.
Configuring Mapping for Collective Elements
Mappings for collective elements follow two structures:
- Many-to-one Relationships (Sections and Sub-Sections)
- One-to-many relationships (Repeating Sections and Loops)
Many-to-One Relationships (Sections and Sub-Sections)
Field Path
Current_Object.Parent_Object
An example from the Smart Form Designer Mapping tab for a Section (Sub-sections are similar) is shown below.
No data actions can be specified, (Upsert will be used).
One to Many Relationships (Repeating Sections and Loops)
Repeating Sections and Loops are commonly used when creating or updating Salesforce records and as such they have more configuration options available in addition to the normal mapping syntax.
Field Path
Current_Object.Child_Object
In the example below, the Smart Form Designer for a Repeating Section is shown.
Data Action (Mandatory if a Child Object Name is Present)
- Upsert: Update records where possible, and create new records when the Repeating Section (or Loop) iterates for more times than there are existing records
- Update: Update existing records only. No new records will be created and synced back to Salesforce
- Create: Create new records only, existing records will not be modified.
Relationship Field Name (Mandatory if a Child Object Name is Present)
- This will be pre-filled for you based on the relationship between the current object and the child object.
Order By (Optional)
- You can use a SOQL expression, any field you sort on, Name in this example, must be in the child object. This affects the order in which records are shown to you in the mobile app
Filter Results (Optional)
- You can filter records using a SOQL expression, any field you sort on, Title in this example must be in the child object
Tip: Using record filters is extremely useful and can be used as an extension to your sync scope. For example if you need a very generic sync scope that downloads all the contacts, but only want to see a smaller subset in your Smart Form then using a filter enables you to do this.
Remember: Mapping configurations for collective elements MUST always end in another object.
Additional Smart Form Mapping Flexibility
Smart Forms also support extra flexibility options:
Data Input Elements can be configured with an object relationship ahead of an object field to a parent object, for example:
Field Path
Current_Object.Parent_Object.Parent_Object_Field
This method is useful for a single or small number of data input elements, but where multiple elements need to be mapped in this manner, it is more efficient to use a Section or a Sub-section with the necessary base mapping already configured.
Data input elements cannot be configured with an object relationship ahead of an object field to a child object, a Loop or a Repeating Section must be used to support one-to-many relationships.
File Upload elements (images, videos, files) and Signature elements also can be mapped to the Smart Form running record via the mapping tab on these element types. It is not possible to use the object-to-object mapping techniques described in this article for File Upload elements and if File Upload or Signature elements are mapped they can only be mapped to the Smart Form running record.