Description
Finds a value in any field on any entity based on 1 or more search criteria. Note that the defaultvalue parameter is optional.
Find on the account entity the description property where the name equals Microsoft.
Signature
FindValue( 'entitylogicalname', 'inputfieldname', 'inputfieldvalue', 'outputfieldname', 'defaultvalue', 'nolock', 'cacheenabled' )
Example 1
Perform a search on the account entity where the name equals Microsoft and return the contents of the description field. Set a default of ‘Not Found’
FindValue('account', 'name', 'Microsoft', 'description', 'Not Found', false)
Example 2
Similiar to the previous example but instead of hardcoding the search value you can also pass in parameters to the function
FindValue('account', 'name', [account.parentaccountname], 'description', 'Not Found')
Example 3
You can search based on multiple input parameters.
FindValue(
'account',
SetFindAnd('name', 'accountnumber'),
SetFindAnd('north52', 'Acc-100452'),
'description'
)Note 1: By default the nolock parameter is set to false
Note 2: By default the cacheenabled parameter is set to true. When using formulas of type Process Genie it may be useful to set this parameter to false if you need to bypass the cache and go directly to the database each time it is invoked within the lifetime of the workflow.
Example 4
You can search for any entity for any row by any value. Such as for Environmental Variables.
FindValue( 'environmentvariabledefinition', 'schemaname', 'new_vat_rate', 'defaultvalue' )
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| entitylogicalname | xxxx | xxxx | xxxx |
| inputfieldname | xxxx | xxxx | xxxx |
| inputfieldvalue | xxxx | xxxx | xxxx |
| outputfieldname | xxxx | xxxx | xxxx |
| defaultvalue | xxxx | xxxx | xxxx |
| nolock | xxxx | xxxx | xxxx |
| cacheenabled | xxxx | xxxx | xxxx |
Notes:
