Job Runner

Retrieve Records with Same Conditions of Related Records

Overview

Retrieve records with the same conditions as the Related records field.

Usage

Place the action to set the Kintone connection settings before the action Retrieve Records with Same Conditions of Related Records.

You can use the result of the calculation in other Actions.

The following actions differ from the list of Related records displayed on the screen of the Kintone app:

  • If you omit limit, you will get all records that match the criteria.
    • Please note that processing can take a lot of time if you have a large number of matching records.
  • Get fields other than Datasource App Fields to Display fields.
    • This allows aggregation and browsing of fields in Related records that are not visible on the app screen.

Parameter

Set Record, Reference Table Field, API Token, Limit, and When Current Record Also Matches the Condition.

Record

Specify the records that have the Related records field.

If this contains multiple records, get the related records from each record.

Reference Table Field

Add a Related records field.

API token setting

Here we need to specify two API Tokens.

One is the API Token to the original app for the Related records. The app from which to get the record parameter, or in other words.

The other specifies an API Token to access the app set to Referenced app in the Related recods field.

Choose from the actions to Set Kintone API Token.

Each API Token must have the following permissions:

app Privileges Required
Original app • View record or Add record
app management
Datasource app View records

Limit

Setting this parameter limits the number of records to be got if many records match the key. If this parameter value is omitted, all records matching the key are retrieved.

If there are many matching records, it takes time to get them all. A smaller value for this parameter can shorten the processing time in such cases.

If the record contains multiple rows, this limit is the limit of the number of gets from one record row. It doesn’t limit the total number of record that get related records from all “record”.

Specifying zero or less causes an error.

When current record also matches the condition

If you have set yourself to Referenced apps in the Related records field settings, depending on Criteria, the Get result may include the record itself (the Self record). Select whether to include or exclude this record in the results if it matches the Criteria in this way.

For Get My record Also, if your record matches the Criteria, include your record in the Get results. Get My record Also will not include my record in the results if my record does not match the Criteria.

Exclude Own record does not include your record in the Get results, even if your record matches the Criteria.

If the Referenced app in the Related record field refers to another app, When Current Record Also Matches the Condition has no particular meaning, so it doesn’t matter which one you choose.

Occurrence of record Retrieval Criteria

Criteria Occurrence
“When record Row Is Ready”
“When All record Rows Are Ready”

* Not raised if no record exists that matches the criteria.

Use caution when the record parameter contains multiple lines. In this case, for each row of the record parameter, a When All record Row Is Ready occurs whenever all related record are Get. If connected with When All record Rows Are Ready, the result of this action, visible from the connected source, is all the related record rows for one record row. Related records of other records are not included.

For example, if the record parameter has three records named A, B, and C, and there are 10 related records in A, 5 related records in B, and 3 records in C, then when the record is all rows ready will occur 3 times in the minutes A, B, and C, and when the record is One Row Ready will occur 10 + 5 + 3 = 18.

If you want the criteria to be when you have finished retrieving the relevant records for all records, use When Other Actions Are Completed. If connected by When Other Action Completes, the result of Retrieve Records by Reference Table Condition is simply a concatenation of related records from all records. This can also contain the same record repeatedly.

References

Missing Associated record Information. If you get this error, check the following:

  • Does it include the API Token from the original app?
  • Do you have adequate permissions on the API Token?
  • Has the Field code of the Associated record changed?

Precautions

If you want to perform Retrieve Records by Reference Table Condition from several different actions within a single customization, be careful to specify the API Token. If the record app refers to different apps in the same app from the Related record field, you must specify all of those API Tokens in their respective actions.

For example:

  • In Action X, the original app is A, and the app referenced from the Related record field is B
  • In Action Y, the original app is A, and the app referenced from the Related record field is C for both actions X and Y, you need to put three tokens for app A,B,C in the API Token parameter.

Restrictions

  • If you are using a calculated field as the “Record Criteria to Display” in the related record field settings, you may not be able to get record depending on the format in which the calculated field is displayed. Specifically, the case where the accuracy of the display format side is reduced compared to the accuracy of the calculation as shown below.
    • Calculated values have been calculated to time accuracy, but the display format is date
    • Calculated values have been calculated up to the date portion, but the display format is tme
    • Calculated values have been calculated to second precision, but the display format is date, time, and time

関連記事