Create Form
Create a new GoFormz form, assign it to a user, and optionally populate some form fields.
This action can be used to populate all form field types except Locations, Sketches and Tables. Adding Locations and Sketches is not supported at this time, and the Fill Form Table action should be used to fill a table.
Inputs
Key | Value | |
---|---|---|
templateId | Required | The unique 32-digit hexadecimal identifier of the template from which the new form should be created. See here for more details. |
assignmentType | Required | At this time, the newly created form can only be assigned to an individual user, not to a group. So this input must be set to “User”. We plan to add a “Group” assignment type in the future. |
username | Required | The username of the GoFormz user to whom the new form should be assigned. This will be the user's email address, since email addresses double as usernames in GoFormz. |
formName | Required | The name of the new form. You will typically want to make the new name dynamic using workflow variables so that each form has a unique name — otherwise you will end up with many forms having the same name as the workflow is used repeatedly. For instance, if you are creating a form based on an external trigger, you may want to include some information from that external trigger (e.g. customer name or work order ID) in the form name. |
field_<field_name> | Optional | The value to be pre-filled into the form field with name "<field_name>". So for instance if the input is field_TechnicianName and the value is "Jane Doe", then "Jane Doe" will be placed in the form’s “TechnicianName” field. |
Outputs
Output | Value |
---|---|
formId | The unique 32-digit hexadecimal identifier of the new form. Use this ID to reference this form in other actions. See here for more details. |
Usage
Typically, forms are created based on external triggers — for example, you may want to create a new form whenever a new work order is created in Salesforce, in order to capture some data for the work order. However, you can also create a form based on a GoFormz trigger. For example, suppose the first thing you want to do after taking on a new project is a site inspection. Then you would want an approved Project Proposal form to automatically trigger the creation of a Jobsite Inspection form.
In the example below, we show the Create Form step of a common Salesforce integration workflow which is covered in detail here. In this example, when a Work Order object is created in Salesforce, it triggers the creation of a new GoFormz form, with some fields pre-populated.
In this example, the new form's name is composed using the AccountName and WorkOrderNumber fields from Salesforce: #{ForceLookup.[field_AccountName]} - Inspection Report - #{ForceLookup.[field_WorkOrderNumber]}
. The username of the form assignee is also taken from a Salesforce field. Finally, the ProductCode and SerialLotNumber fields in the newly created GoFormz form are pre-populated.
Updated over 6 years ago