Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| a_f:a:create [2022/09/01 02:47] – administrator | a_f:a:create [2024/05/16 03:35] (current) – [Example] aware_admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{tag>Actions | + | {{tag>Index Action |
| ====== CREATE ====== | ====== CREATE ====== | ||
| Line 10: | Line 10: | ||
| where Id() is identifier of the business object to create, for example | where Id() is identifier of the business object to create, for example | ||
| - | <code aim> CREATE Account </ | + | <code aim> |
| and Arithmetic Operation is an expression producing a string indicating the name of the object to create. | and Arithmetic Operation is an expression producing a string indicating the name of the object to create. | ||
| Line 20: | Line 20: | ||
| ===== Example ===== | ===== Example ===== | ||
| - | <code aim> CREATE Account WITH Account.State=' | + | <code aim> |
| The attributes to be initialized must follow the '' | The attributes to be initialized must follow the '' | ||
| Line 29: | Line 29: | ||
| This action will create as many instances of the object as there are instances of another business object in the Context. For example, | This action will create as many instances of the object as there are instances of another business object in the Context. For example, | ||
| - | <code aim> CREATE Transaction FOR EACH Account </ | + | <code aim> |
| | | ||
| This action will create as many instances of the specified business object as there are days(weeks/ | This action will create as many instances of the specified business object as there are days(weeks/ | ||
| - | <code aim> CREATE Transaction FOR EACH DAY BETWEEN Account.OpeningDate AND Account.ClosingDate </ | + | <code aim> |
| The date interval includes both starting and ending dates. | The date interval includes both starting and ending dates. | ||
| Note also that if the object being created has any attributes of the Date type, these attributes can be initialized with the value of the date for which the object is being created. For example, | Note also that if the object being created has any attributes of the Date type, these attributes can be initialized with the value of the date for which the object is being created. For example, | ||
| - | <code aim> CREATE Transaction FOR EACH DAY BETWEEN Account.OpeningDate AND Account.ClosingDate WITH Transaction.AppliedDate=Day </ | + | <code aim> |
| + | |||
| + | | ||
| + | |||
| + | This action will create as many instances of the specified business object as there are dates in the attribute storing text with Multi-Dates content. Note that the Arithmetic Operations here must be resolved to a string with multi-dates content (type of the text attribute must be Multi-Dates), | ||
| + | <code aim> | ||
| + | |||
| + | | ||
| + | |||
| + | This action will create as many instances of the specified business object as there are substrings in the attribute storing a delimited string. The default delimiter is ' | ||
| + | <code aim> | ||
| | | ||
| This action will create as many instances of the specified business object as there are numbers in the specified interval. Note that the Arithmetic Operations here must be operations on numbers, for example, | This action will create as many instances of the specified business object as there are numbers in the specified interval. Note that the Arithmetic Operations here must be operations on numbers, for example, | ||
| - | <code aim> CREATE Transaction FOR EACH NUMBER BETWEEN 1 AND 3 </ | + | <code aim> |
| * '' | * '' | ||
| This action will create as many instances of the specified business object as there are files in the specified directory. The Arithmetic Operation used in the expression must produce a string specifying the directory in which the system will look for files. For example, | This action will create as many instances of the specified business object as there are files in the specified directory. The Arithmetic Operation used in the expression must produce a string specifying the directory in which the system will look for files. For example, | ||
| - | <code aim> CREATE Attachment FOR EACH FILE IN ' | + | <code aim> |
| Note also that if the object being created has any attributes of the Document type, these attributes can be initialized with the file for which the object is being created. For example, | Note also that if the object being created has any attributes of the Document type, these attributes can be initialized with the file for which the object is being created. For example, | ||
| - | <code aim> CREATE Attachment FOR EACH FILE IN ' | + | <code aim> |
| Every attachment object created in this way will have the Document attribute initialized to the file for which the attachment is being created. | Every attachment object created in this way will have the Document attribute initialized to the file for which the attachment is being created. | ||