Node - Get single piece of data
Function
You can get a record through this node, put this record in the main workflow, and then you can update or delete this record, or it can be used in other nodes.
You can get a record at random or get the first record in order.
4 ways to get data
1. Get from worksheet
- Get a record from a worksheet based on filter criteria.
2. Get from node with multiple data
- If there is the node [Get multiple pieces of data] in the workflow, you can get one row of records from multiple pieces of data through this node.
3. Get from associated field
- Get a record from the associated worksheet or the subform.
4. Get from record link
- Get the corresponding record by parsing the record link in the text field.
The following are examples of these four ways:
- Way 1: Get from worksheet
- Way 2: Get from node with multiple data
- Way 3: Get from associated field
- Way 4: Get from record link
Way 1: Get from worksheet
Scenario
When a new lead is added to the worksheet Lead Management, check if there is already a record of this customer in the worksheet Contact by phone number.
If a record is found, the field [Customer Status] in the record is changed to [Potential Customer].
If no record is found, a new record is automatically added to the worksheet Contact.
1. Add the node – [Get single piece of data]
Since you are looking for records from the worksheet Contact, select [Get from worksheet].
2. Set the node
A. Select the worksheet from which to get data
B. Set the filter
For a single condition, you can enter a fixed value manually or select a dynamic value from the previous node object.
You can also set up groups of conditions and add [And] or [Or] between different conditions.
C. Collation
If there are multiple eligible records, then the first record will be taken according to the set sorting rule.
D. Ignore collation and get one at random
If checked, the sorting rule is ignored and take one record that meets the conditions randomly.
E. If cannot obtain any data
When there are no records in the worksheet, or no eligible records, you can choose one of three ways to continue:
Continue the process
If no record is found in the worksheet, continue executing the node in the workflow. If the node object or field is used, it is skipped or null is returned.
Continue after adding new record to the worksheet
If you cannot find a record in the worksheet, you can add a new record directly to the worksheet. If necessary, subsequent nodes also use the newly created record.
Abort the process, or continue to judge the branch based on the finding results
If this node is followed by a branch on the result, then execute the [No data] branch. If it is followed by other nodes, the workflow ends.
In the example, we choose to add a new record to the worksheet Contact and return this record object.
3. Update the obtained records
After getting the record, add the node [Update record] to change the status of the customer.
In the example, the object to be updated is the record in the worksheet located in the previous node; the field to be modified is [Customer Status], and the value of the field is set to [Potential Customer].
4. Combine with the node – [Branch]
Sometimes, if you can’t get the data and you don't need to add a record directly, but need other actions, you can add a [Branch] node and choose [Add a branch flow based on the finding results]. Depending on the results, you can set different operations.
5. Combine with the timed triggering workflow
Whether a timed triggering workflow is triggered or not has nothing to do with worksheet data. After the workflow is triggered, there is no data in the worksheet in the process. If you need to modify a record in a worksheet, you need to add [Get single piece of data] node or [Get multiple pieces of data] node to locate the required record in the process first, and then to update or delete it, or use its value.
Way 2: Get from node with multiple data
The node [Get multiple pieces of data] can help to get multiple rows of records from a worksheet, and it can also help to get multiple rows of data from the [Sending API requests] node or [Code Block] node, so what you get in this way may also be one row of records or one row of data.
Scenario
In an approval node with multiple approvers, you want to get the information of the latest approval. You can get the information of all approvers through the node [Get multiple pieces of data], and sort the information by time through the [Get single piece of data] node to get the latest one.
Configure Workflow
As shown in the figure below, in the [Pass] branch of the approval node, get the approval information of multiple approvers first through the get multiple pieces of data node, and then get one piece of data from the previous node through the [Get single piece of data] node.
The filtering, sorting, and random fetching when finding data are the same as in way 1 above.
Way 3: Get from associated field
Scenario
As shown in the figure below, a new record of outbound detail is created and associated with a product record. When the outbound record is submitted, the inventory in the product record needs to be updated, but there is no inventory information for the product in the outbound record. So, you need to get the associated product record before you can update the inventory.
1. Add the node – [Get single piece of data]
Add the node and select [Get from associated field].
2. Set the node
A: Select the target record, that is, the record of outbound detail that triggered the workflow.
B: Select the associated field, and select the field [Product] here. To get the record of the product to be outbound according to the associated product field in the outbound record.
C: If there are multiple associated records, you can set filters.
D: If there are multiple associated records that all match the conditions, take the first record according to the sorting rule.
E: If cannot obtain any data
When there are no associated records, you can choose one of two ways to continue:
Continue the process
If no record is found in the worksheet, continue executing the node in the workflow. If the node object or field is used, it is skipped or null is returned.
Abort the process, or continue to judge the branch based on the finding results
If this node is followed by a branch on the result, then execute the [No data] branch. If it is followed by other nodes, the workflow ends.
3. Update the obtained record
This node indicates that a record has been obtained in the workflow, but no actual action has been performed. You can add the [Update Record] node to modify the record, the [Operation] node to use the value of the record, or the [Delete Record] node to delete the record.
Add the [Update Record] node to modify the inventory
The existing inventory minus the outbound quantity is the new inventory.
Way 4: Get from record link
Through this node, you can get the corresponding record through the record link in the text field of the worksheet, and pass the obtained record to the later node if needed.
Scenario
To match the records in the Purchase Order worksheet through the links stored in the text fields of the Purchase Details worksheet and automatically associate them.
Configure Workflow
As shown in the following figure, according to the links stored in the text field (description) in the Purchase Details worksheet, to find, match and associate the corresponding record in the Purchase Order worksheet. Add a [Update record] node to update the obtained records to the associated records in the Purchase Details worksheet.
Links that can be identified:
Internal: a QR code link for sharing records
External: QR code link for sharing records (system printing, word template printing)
If cannot obtain any data
What if no records or data are obtained and subsequent nodes need data in this node?
Take [Get a single piece of data] as Node A, and the subsequent node as Node B.
If Node A is treated as an object (to update or delete), Node B is skipped because there is no record in Node A.
When Node B needs the value of a field in Node A, it returns empty and continues to execute Node B.
See the following for details:
Have questions about this article? Send us feedback