KrewData Features / Commands / Output App
In This Topic
    Output App
    In This Topic

    A data editing flow always ends with an Output App command.

    Output App command specifies the kintone app in which resulting data of data editing flow is outputted. A data editing flow must have at least one Output App command.

    The Output App command can automatically number the output and table records. For more information about automatic numbering, see Auto Number.

     Settings
    Setting Description
    Output app Specify the kintone app to output the result of data editing flow.
    Output method Specify how to output resulting data of the data editing flow.
    • Update:Identifies record in resulting data through the specified update key, and updates the matching record. If not matched, adds it as a new record.
    • ReGenerate:Deletes all the records from output app and outputs the resulting data of data editing flow.
    • Append:Appends the resulting data of data editing flow in output app.
    Update or Insert Specify how to output when Update option is selected.
    • Check On:Updates new value if record with same key value exists. Else, inserts it as a new record.
    • Check Off:Only updates new value if record with same key value exists. Else, the record is not outputted.
    Field in Output App Displays list of fields in output app.
    Field in Data Editing Flow Specify fields of resulting data of data editing flow for each field of output app.
    Key to Bulk Update When update method is set to Update, specify a key field to uniquely identify the records in resulting data of data editing flow.
    Record Output Order Specify order of outputting records to the output app by setting the sort condition.
    This setting only targets the new records which are added. It does not reorder the records that already exist in the output app and are just updated.
    Table Record Output Order

    Specify order of outputting records to table of the output app by setting the sort condition.
    This setting only targets the new table records which are added. It does not reorder the records that already exist in the output app and are just updated.

    In the Select App dialog, select Create New Output App to create an app having same field structure as that of resulting data of data editing flow.

    • The new app is created in the same space as the krewData app you are currently using.
    • Among fields of the new app, the fields that are loaded from input app take over the same settings as that of input app and the ones that are created during data editing flow are created with default settings of that field type.
     Available Field Types

    For information about field types that can be used in Output App command, see Types of fields.

    If the field type in your app is different from the field type in the data editing flow, the field type changes automatically. For information about field types that can be changed, see Field Types That can be Changed section of Set Field Type.

     Output Method

    This section discusses about each output method.

    Update

    This option uniquely identifies record in resulting data through the specified update key, and updates the matching record. If matching record is not found, a new record is added.

    In following example, Product and Department field are specified as update key.

    When "Update or Insert" is ON

    • If a record that matches the specified update key exists in the output app, data of that record is updated.
    • If multiple records matching the specified update key exist in the output app, all those records are updated with same data. 
    • If there is no record matching the specified update key in the output app, new records are added in the output app (In this case, record with "Product D", "Sales Department#4").
    • Records that are not updated with the resulting data remain intact in the output app (In this case, record with "Product B", "Sales Department#3").

    When "Update or Insert" is OFF

    • If a record that matches the specified update key exists in the output app, data of that record is updated.
    • If multiple records matching the specified update key exist in the output app, all those records are updated with same data. 
    • If there is no record matching the specified update key in the output app, no records are generated (In above example, record with "Product D", "Sales Department#4").
    • Records that are not updated with the resulting data remain intact in the output app (In above example, record with "Product B", "Sales Department#3").

    If the resulting data record cannot be uniquely identified with the specified update key, an error occurs and the output app is not updated.

    ReGenerate

    Deletes all the records that exist in output app and outputs the resulting data of data editing flow.

    Append

    Appends the resulting data of data editing flow in the output app.

     Output Method of Table Records

    This section discusses about various output methods of table records. Output method of table record is enabled when output method of parent record is set to Update.

    Update

    This option uniquely identifies record in resulting data through the specified update key, and updates the matching record. If matching record is not found, a new record is added.

    In following example, update key of parent record is specified as Company ID field and that of table record is Product field.

    • If a record that matches the specified update key exists in the table, data of that record is updated (In above example, "kintone" record).
    • If there is no record matching the specified update key in the table, new records are added to the table (In above example, "Mailwise" record).
    • Records that are not updated with the resulting data remain intact in the table (In above example, "Office" and "Garoon" record).

    When field of data editing flow is not assigned to field of the output app

    • Values of fields that are not assigned flow result for existing records are neither updated nor deleted (In above example, "kintone" and "Office" record).

    ReGenerate

    Deletes all the records that exist in the table and outputs the resulting data of data editing flow.

    When field of data editing flow is not assigned to field of the output app

    • The entire table is updated and values of fields to which result was not assigned are left empty (In above example, Contract Date field).
     Behavior While Updating Lookup Fields

    This section discusses about how records are outputted when a lookup field is updated.

    Following example considers a scenario where Order Number field is specified as an update key and a record containing lookup field Customer ID is updated. Company Name and Person In Charge fields are specified as Field Mappings in the lookup settings.

    Record with Order Number = "1001"

    In resulting data of data editing flow, Customer ID changed from "C1001" to "C1004".

    As lookup field has updated, Company Name and Person In Charge fields are also updated with value of the record corresponding to the "Customer ID:C1004" record of the Datasource App.

    Record with Order Number = "1002"

    This record does not have a field updated with resulting data of data editing flow, but Person In Charge field of "Customer ID:C1002"of the Datasource App is different in output app before update.

    In this case, krewData updates the output app by getting latest value from the Datasource App.

    Record with Order Number = "1003"

    This record is a new record that does not exist in the output app before the update.

    krewData retrieves the value of Company Name and Person In Charge field specified as Data Mappings in the lookup settings from the Datasource App, and adds new records in the output app.

     Change Output App
    To change an already selected output app, click the Select App button in the Configuration tab and select another app.
     Upper Limit of Record Count
    There is an upper limit to number of records that can be posted to a kintone app while executing a data editing flow. For more details, see Upper Limits.
     Automatic Numbering
    For information about automatic numbering, see Auto Number.
    See Also