Differences

This shows you the differences between two versions of the page.

Link to this comparison view

action type - import records [2016/09/14 14:19] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +====== Import Record ======
 +Import [[Record|record]] actions are used to trigger [[Record Importer|record imports]] which read from a CSV file and create record(s) for each row, saving [[Field|fields]] and creating [[Relationship Record|relationship records]] as defined in the import profile.
 +===== Explanation =====
 +Import record actions are used whenever a group of records should be created from data in a CSV file that has been uploaded to the application. ​ These actions allow automation of record importer operations.
 +
 +Actions can be attached to an import record action on either the red global [[Automation Trigger|automation trigger]] or the yellow local trigger. Actions on the global trigger will run anytime a record is updated in this [[Table|table]] throughout the application,​ so [[Action Type - Record Operation|an evaluation]] is necessary to ensure that it's only triggered on the add operation. Actions on the local trigger will run during this import record action only, so no evaluation is required. Actions on either trigger will be run once for each set of records created by the import as it processes.
 +
 +{{ ::​action_import_record_drop.png?​direct&​600 |}}
 +
 +Example: Suppose someone received a CSV formatted file where each line represented a piece of inventory that had come in off of a truck, and wanted to upload that CSV into the application and have it create records in an Inventory table to match the new shipment. ​ They would start by using the record importer to create an import profile that they want to roll out with the application,​ upload a test CSV, and make sure to get that working as necessary creating the appropriate Inventory records. ​ Then, they could create a form where a CSV is uploaded onto a new Shipment record via a [[Field Type - File Attachment|file attachment]] field. ​ Then, on save of that field, they would create an import record action to run the import profile they had created with the file from the file attachment field.
 +===== Settings =====
 +==== Select the File Field where the import CSV is ====
 +
 +Use this query to find the record where the import CSV resides, and select the appropriate file attachment field.
 +
 +{{ :​action_import_record_csv.png?​direct |}}
 +==== Select the Import Profile to use ====
 +Choose the appropriate import profile to use for this import. Only import profiles built to rollout with the application are available.
 +
 +{{ ::​action_import_record_profile.png?​direct |}}
 +
 +==== Describe this action ====
 +Useful as a comment, this description will overwrite the automatically generated description in the [[Action Manager|Action Manager]].
 +==== Queue this action and children ====
 +When an action is [[Action Queue|queued]],​ the subsequent actions continue to process without it. Meanwhile, the queued action and its children process separately. Queue actions that you don't want a user to wait for.
 +
 +
 +===== Creating a Global Application Data Import Section =====
 +==== Create A Tab ====
 +Create a [[Best Practices - Global Application Settings|Global Application]] table and add a new tab for "Data Import"​.
 +
 +{{:​creating_global_app_data_import_section_tab.png?​600|}}
 +
 +==== Add File Attachment and Link Fields ====
 +Then,create a field grid with [[Field Type - File Attachment|file attachment fields]] (for the .CSV file you need to import) and a [[Field Type - Link|link field]] to run the data import action. For example, the image below has 3 different [[Field Type - File Attachment|file attachment]] fields, and 3 different link fields for "​Suppliers",​ "​Product Type" and "​Product Descriptions",​ each with a unique .CSV file and a corresponding [[Field Type - Link|link]] to run the data import action for each. 
 +
 +{{:​creating_global_app_data_import_section_field_grid.png?​600|}}
 +
 +
 +==== Create Automation ====
 +On the field automation for each link, create a new "​Import Record"​ action.
 +
 +{{:​creating_global_app_data_import_section_field_automation.png?​600|}}
 +
 +==== Configure the Action ====
 +After creating the action, configure the first option on the settings to find the file attachment field that the .CSV is uploaded to. This can be used to find the .CSV file that was uploaded to the Global Application Data table. ​
 +
 +Configure the second option to select the [[Record Importer|data import profile]] you would like to use. Note that the new .CSV uploaded onto the Global Application Data table must have the same configuration of the .CSV that was used on the original [[Record Importer|data import profile]].
 +
 +{{:​creating_global_app_data_import_section_action_configuration.png?​600|}} ​
 +
 +==== Queue the Action ====
 +Lastly, queue the action so the user will not have to wait until the import is completed to continue using the application.
 +
 +{{::​creating_global_app_data_import_section_queue.png?​600|}} ​
 +
  
action type - import records.txt ยท Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2019