Document Generation
...
Template - Resources
Record Single Variable
introduction a record single variable contains an entire record and all of the field values on that record creating a record single variable is like retrieving an object record with conditions set on the fields for example, creating a contract document from the contract object may require details from other associated or unassociated records, such as opportunity amount or account acv these account or opportunity records can be retrieved as a record single variable with conditions set like opportunity id = contract > opportunity id to create a record single variable, follow the steps below click ' resources '; the resource manager opens up in the ' new resource ' pane, select resource type from the drop down as ' record single variable ' enter a label , and the api name will automatically populate select the object filters to determine which record is retrieved, you must define filter conditions these conditions are used to compare values from the selected object and determine if a record meets the required logic to proceed begin by selecting the main operator that controls how multiple conditions will be evaluated and all conditions must be true or at least one condition must be true custom allows for advanced expressions (e g , (1 and 2) or 3) once the main operator is set, define one or more filter conditions each condition includes a field from the selected object a comparison operator a value to compare against click + add condition to include additional filter rows the overall filter logic follows the main operator you selected (and/or/custom) add conditions field the field dropdown allows you to select a specific field from the chosen object to filter or identify a record based on matching criteria (e g , email , firstname, status, custom field c) operator choose a logical operator from the dropdown equals matches records with a field exactly equal to the specified value (e g , for string, picklist, number, boolean) not equals matches records where the field does not equal the given value (e g , for string, picklist, number, boolean) greater than matches records where the field value is numerically greater (e g , for integer, decimals, currency) greater than or equals matches records where the value is greater than or exactly equal (e g , for integer, decimals, currency) less than matches records with a value lower than the specified input (e g , for integer, decimals, currency) less than or equals matches records with a value that is less than or exactly equal (e g , for integer, decimals, currency) in matches records where the field value is one of multiple specified values (e g , for picklist, multi select picklist) not in excludes records that match any of the specified values (e g , for picklist, multi select picklist) like matches records based on partial text (e g , for text, email, url) value the value field is used to specify what the selected field should be compared against this can take multiple forms, depending on your use case global variables field value from the same object record ({!$record id}) record (single) variables field value from related records runtime variable dynamic runtime variable docid\ axlc5bzdbbimwpkbabj9 value passed into or generated within the flow that allows conditions to adapt based on the data being processed during execution global constants a direct input like the following {$globalconstant false} boolean false {$globalconstant true} boolean true {$globalconstant emptystring} represents a blank or empty value {$globalconstant currenttime} dynamically inserts the exact timestamp when the document is generated order by (optional) you can optionally define the order in which matching records should be sorted by selecting a field sorting can be done in ascending (e g , oldest to newest, a–z) or descending (e g , newest to oldest, z–a) order once sorted, only the first record in the resulting list will be fetched and stored in the variable use case a company uses cloudfiles to generate contract documents automatically each contract is related to an opportunity, and the business team wants the generated contract to include the most recent opportunity amount linked to the same account goal retrieve the latest opportunity associated with the account at the time of contract generation and display its opportunity amount within the document below is the video demonstration of this use case \<video>