Job Runner

Bundle Records by Field Value

Overview

Bund and group records with the same date value in the specified field and convert them to a new record. Groups can also be made by month or week.

Usage

Bind records using key dates and date/time fields and map them to a different record format. Rather than simply binding them together based on the equality of values, it is possible to bind them together based on the day, week, or month the date or time represents.

Example:

Conversion Example

As you can see above, the Sales app, before conversion, keeps track of one sale with one record, recording the time the sale occurred. Assume that you convert this into a daily number, the total amount.

First, get the records before conversion and set them to the Record parameter. Then, select sales time for the Date fields and day for the Unit fields.

Conversion mapping allows the aggregation of field values within bundled records using Aggregation functions as follows: This example uses the sum function and count functions. To see what other Aggregation functions are available, see the Function list.

Date handling is something that you have to be careful about. Reception Time contains the Reception Time for all bundled records. So, in this case, you need to get one value on the representative, put it in Date format and set it.

Value Set To Field
=format(Reception Time[0], “YYYY/MM/DD”) Date
= count(Record number) Number of sales
= sum(amount) Total sales

In this example, records with the same reception time are grouped and mapped to one record for conversion. In this example, we have two date groups, 2022-03-01 and 2022-03-02, so we have two records to convert to.

The result of the Action is the transformed record. Note that this record has not yet been saved anywhere and is not automatically saved. To save the converted record, connect to Add Records from Other Records, etc.

Parameter

Set Record, Date Field, Unit, Target app, and Conversion Mapping.

Record

Select the Action you used to retrieve the target records.

Because of its nature, this Do is meaningless if it does not contain multiple records. Note that after connecting records with When One Row is Ready, the records will become one row, and the conversion will have no effect.

Date Field

Select the Date fields that will be key in the records.

This parameter accepts the following field types:

  • Date
  • Date and time

This parameter does not accept fields that are inside tables.

Unit

Specify the unit to bundle.

Daily, Weekly, Monthly, and Year/Month are available. Weekly can be selected to start the week on Monday or Sunday.

For monthly units, the same month in different years is also bundled. For example, January 2023 and January 2024 are bundled as “January”. If you want to bundle different years separately, select Year/Month.

If the Date fields was a Datetime field, date interpretation is based on the Time Zone set in Set Time Zone. If you have not set Time Zone, it will be interpreted in JST.

Target app

Specify the destination app.

The app does not store records, but it is necessary to determine the list of fields to convert to.

Mapping

Enter the conversion mapping.

When referencing the source field value in this Mapping, the result is an array that contains the Field values of all the bundled records. Note that the key date Fields are also arrayed.

Occurrence of record Retrieval Criteria

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

“When One record Row Is Ready” occurs once per record converted.

If there were no records, neither would occur.