Returns the record from an Object by Record Name.
Function
resource([Object], 'Record Name')
Arguments
Argument | Data Type |
Input 1 | Object |
Input 2 | String |
Result | Record |
Comments
The resource function returns a record with a specified name..
A common use of the resource function is when an Record needs to be processed by a workflow, but the name the record is unknown until the workflow runs - this allows records to be processed dynamically.
Example
Assume you need send a Survey (survey is a stored as a Record) using a Workflow, but the survey changes each year. Rather than hard code the name of the survey and change it each year, you can use the context function to retrieve the survey IF you can predict its name.
Resource ( [Object] , 'Exact name of Record' )
For the sake of this example consider a Workflow with an activity 'Launch Person Campaign' where the name of the Survey is:
[BCM Assessment FY23]
By extracting the last 2 digits from date year into a Variable called [FY] we can dynamically return the correct survey for any given year:
Resource( [User survey] , '[BCM Assessment FY]' + [FY] )
To make use of the Resource function the rest of the name must be consistent, that means the spacing in the string is important - the input string MUST be an exact match to the Record Name. Perhaps more common use-cases for the Resource function are to return a:
... person without knowing their name
Resource( [Person] , 'John Smith' )
... choice field option
Resource( [Task Status] , 'Active' )
Resource function can be used with any [Object] ; it's worth noting that the Resource function also supports dot notation, [Object].[Attribute] - e.g.:
Resource( [Configuration] , 'BCM Config' ).[Review Frequency]