Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_f:a:import [2022/09/01 01:23] – ↷ Page moved from a_f:3100_actions:import to a_f:a:import administratora_f:a:import [2025/06/12 03:59] (current) – Change to AwareIM aware_support3
Line 1: Line 1:
-{{tag>Actions Action_List Process Business_Object}}+{{tag>Index Action Action_List Process Business_Object}}
 ====== IMPORT ====== ====== IMPORT ======
  
Line 10: Line 10:
 where Id() is the identifier of the business object to be imported and the ArithmeticOperation() is the expression identifying the name of the import file. The result of the arithmetic operation must be a string. For example: where Id() is the identifier of the business object to be imported and the ArithmeticOperation() is the expression identifying the name of the import file. The result of the arithmetic operation must be a string. For example:
  
-<code aim> IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv'</code>+<code aim>IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' </code>
  
 If ''FROM XML'' keyword is used the identifier indicates the XML string to import from, rather than the name of the import file. If ''FROM XML'' keyword is used the identifier indicates the XML string to import from, rather than the name of the import file.
Line 20: Line 20:
 If the action is likely to import many instances of the business object (hundreds or even thousands) their processing may take a while. In this case it is better to perform processing in smaller chunks (batches). After the processing of each batch finishes the results are immediately committed to the system and stored in the database. If the batch size is not specified the system will only commit the results once all instances have been processed. For example: If the action is likely to import many instances of the business object (hundreds or even thousands) their processing may take a while. In this case it is better to perform processing in smaller chunks (batches). After the processing of each batch finishes the results are immediately committed to the system and stored in the database. If the batch size is not specified the system will only commit the results once all instances have been processed. For example:
  
-<code aim> IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' IN BATCHES OF 100</code>+<code aim>IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' IN BATCHES OF 100 </code>
  
   * ''WITH VALIDATION''   * ''WITH VALIDATION''
Line 26: Line 26:
 If this keyword is specified any rules associated with the business object being imported will be executed. If this option is omitted, the instances of the business object will be stored in the system but any rules associated with the business object will not be executed. If any rule fails for some record in the import file, this record will be ignored. For example: If this keyword is specified any rules associated with the business object being imported will be executed. If this option is omitted, the instances of the business object will be stored in the system but any rules associated with the business object will not be executed. If any rule fails for some record in the import file, this record will be ignored. For example:
  
-<code aim> IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' WITH VALIDATION</code>+<code aim>IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' WITH VALIDATION </code>
  
 <callout type="primary" icon="true" title="note"> This option will slow down the import process considerably and is recommended when import files are not too large. On the other hand using this option will guarantee that only valid instances of the business object are stored in the system.</callout> <callout type="primary" icon="true" title="note"> This option will slow down the import process considerably and is recommended when import files are not too large. On the other hand using this option will guarantee that only valid instances of the business object are stored in the system.</callout>
Line 38: Line 38:
   * ''CREATE IF NOT FOUND''   * ''CREATE IF NOT FOUND''
  
-If this keyword is specified the import file can be used both to update existing records and create new ones. If a record referred to in the file is not found //**Aware IM **//will create a new record.+If this keyword is specified the import file can be used both to update existing records and create new ones. If a record referred to in the file is not found //**AwareIM **//will create a new record.
  
 See also the “[[:docs:2000_concepts:0900_prod_feats:0600_export_import|Export and Import]]” section. See also the “[[:docs:2000_concepts:0900_prod_feats:0600_export_import|Export and Import]]” section.
Line 46: Line 46:
 If this keyword is specified an import is performed using one of the user-defined import templates, for example: If this keyword is specified an import is performed using one of the user-defined import templates, for example:
  
-<code aim> IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' USING 'My import template'</code>+<code aim>IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' USING 'My import template' </code>
  
   * ''ENCODING''   * ''ENCODING''
Line 52: Line 52:
 This keyword specifies encoding of the imported file, for example: This keyword specifies encoding of the imported file, for example:
  
-<code aim> IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' ENCODING UTF-8'</code>+<code aim>IMPORT PersonalSavingAccount FROM 'c:/mydocuments/psa.csv' ENCODING UTF-8' </code>
  
 The default encoding is UTF-8. The default encoding is UTF-8.
  • Last modified: 2022/09/13 18:11