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 01:23] – removed - external edit (Unknown date) 127.0.0.1 | a_f:a:create [2024/05/16 03:35] (current) – [Example] aware_admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{tag> | ||
| + | ====== CREATE ====== | ||
| + | |||
| + | This action creates an instance of the specified business object. | ||
| + | |||
| + | ===== Syntax ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | where Id() is identifier of the business object to create, for example | ||
| + | |||
| + | <code aim> | ||
| + | |||
| + | and Arithmetic Operation is an expression producing a string indicating the name of the object to create. | ||
| + | |||
| + | Note that the identifier here is not the attribute identifier and thus may not indicate a reference. The action is also not applicable to business object groups. | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | <code aim> | ||
| + | |||
| + | The attributes to be initialized must follow the '' | ||
| + | |||
| + | Sometimes it may be necessary to create several instances of a business object with a single CREATE action. The following constructs are supported: | ||
| + | |||
| + | * '' | ||
| + | |||
| + | 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> | ||
| + | |||
| + | | ||
| + | |||
| + | This action will create as many instances of the specified business object as there are days(weeks/ | ||
| + | <code aim> | ||
| + | |||
| + | 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, | ||
| + | <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, | ||
| + | <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, | ||
| + | <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, | ||
| + | |||
| + | <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. | ||
| + | |||
| + | * Variation of the above expression is: '' | ||
| + | |||
| + | The only difference with the previous expression is that the file in the specified directory is deleted after the business object has been created. | ||
| + | |||
| + | The '' | ||
| + | |||
| + | The '' | ||