Query Record

Introduction

Feature Overview

The Query Record node can query a specific record in the target form according to filtering conditions and sorting rules. The query result can be referenced repeatedly by subsequent action nodes.

Scenarios

The record queried by Query Record can be called by subsequent nodes for futher actions.

Scenario Name

Problem Statement

Solution on Jodoo

Customer Management

How to avoid redundant records when registering customer information?

Set an Automations Pro to be triggered when information on a new contact is added. It will check whether the contact's company/organization is recorded. If not, it will add the information.

Order Management

How to avoid unfulfilled deliveries and ensure timely inventory replenishment?

Set an Autiomations Pro to be triggered when a sales order is submitted. It will check whether the inventory is greater than the quantity required for the order. If it is, an outbound order will be created, otherwise a shortage prompt will be sent to the warehouse manager.

Preview

In customer management scenarios, when a new contact is added, Automations Pro will query records in the Customer Info. form, to check whether there is information on the contact's company/organization. If not, the corresponding information will be added to the Customer Info. form.

Setup Steps

After creating an automation, you will be directed to the design page. Here, you should first configure the Trigger node. After that, go on to the subsequent action nodes.

Adding the Action Node

Add a Query Record node under existing node(s).

Selecting the Target Form

A target form is the form from which the Query Record node retrieves data. You can select a form as the target form, from the current app or one of the others.

Adding Condition(s) for Query

The Query Record node can only retrieve one record. Therefore, if the target form has multiple records, add condition(s) based on your needs, having the node query the only record that meets the condition(s).

Click Add Condition, and here are the details of the settings:

  • Logic among conditions: When you set multiple conditions, decide whether to retrieve the data that meets all the conditions or those that satisfy any of them.
    • all of: The logic among multiple conditions is "and". The records that meet all the conditions get retrieved.
    • any of: The logic among multiple conditions is "or". The records that meet any one specific condition get retrieved.
  • Fields in the target form: Select fields in the target form, or system fields (Created User, Created Time, Updated Time, and Workflow Status).
  • The rule for filtering: Apply rules based on the types of fields in the target form, and the options are equals, does not equal, contains, does not contain, is empty, is not empty, etc.
  • The filter values: Select Field Value or Custom from the drop-down list. If you select Custom, enter the value manually.

Note:

1. The filtering logic and the filter value can vary based on the type of the selected target field. If you use a subfield for filtering, the suitable filtering logic can only be one of these four: equals any/does not equal any/contains/does not contain. For details, see Illustrations for Filter Value.

2. You can use field values from data stored at some nodes for value assignment. These nodes include the trigger node, Query Record, Query records, Add record, Add formula, and Add Plugin. If the trigger of the automation is a Scheduled Trigger and the Trigger Time is customized, the trigger node cannot be used to assign values.

3. You cannot set conditions for the following fields in the target form: Divider, Query Data, Select Data, Button, the current node, and the current approver.

Adding Sorting Rules

If a sorting rule is added, the node will sort the target records based on the rule, and show the first record of the sorted result. Here are the details of the settings:

1. Choose the fields to sort by. You can sort the records by multiple form fields. The supported field types are:

  • Form fields: Single Line, Number, Date&Time, Radio, Single Select, Serial No.
  • System fields: Created Time, Updated Time

2. Choose sorting order: Ascending or Descending

Note:

1. Each field can be selected in a sorting rule only once. Up to 5 sorting rules can be added.

2. If you do not add a sorting rule for a Query Record node, Automations Pro will retrieve a random record from the target form.

Notes

General Instructions

When the query result at a Query Record node is used at subsequent action nodes, and when the result is empty, the run at subsequent nodes will be affected. For details, see Action Nodes.

Calling the "Records amount" Parameter

When the query result of the Query Record node is called by a subsequent node, the query node will provide the parameter, Records amount, which can act as a single-value numerical field for value assignment. The value of Records amount is the number of records queried.

1. Notes on Calling "Records amount"

Records amount is a real-time value, and will always gets the latest total number of queried records. For example, if the Query Record node queries 1 record, but this record is deleted before the automation flows to the next relevant node, the Records amout value will be updated to 0. Therefore, when the subsequent node calls Records amount, the value will be 0.

2. Use Case

Take synchronizing customer information as an example.

When a new contact is added, the automation will check whether the contact's company/organization information exists in the Customer form.

The Path Condition node calls the Records amount parameter to determine whether the customer is recorded. The automation will flows onto different paths based on the set condition:

  • If Records amount equals 0, there is no information about the customer; the automation adds a new customer.
  • If Records amount is greater than 0, there is information about the customer; if there is anything new, the automation updates the existing information.

Was this information helpful?
Yes
NoNo
Need more help? Contact support