ajRenderFile function
Available since AlchemyJ v4.3 AlchemyJ Enterprise Edition
Description
The ajRenderFile function render file by providing Data Relationship Schema and Freemarket template file.
Syntax
ajRenderFile(data_relationship_header, data_relationship,template_path,file_location,[replace_file], [options],[run_condition],[run_by_function_point_only])
Argument Name | Argument Type | Description |
---|---|---|
data_relationship_header (required) | Range | To specify the range where defines the header of the relationship table. |
data_relationship (required) | Range | To specify the range where defines the content of the relationship table. The empty row would be ignored. |
template_path (required) | String | To specify FTL template location |
file_location (required) | String | To specify the path of the file to be written. |
replace_file (optional) | Boolean | TRUE would replace the file if it exists. FALSE would return #VALUE! If the file exists. |
options (optional) | Variant | Define a list of options that the FTL / PDF library supports. |
run_condition (optional) | Boolean | The function will run when the value is TRUE. Otherwise will not run. The default value is TRUE. |
run_by_function_point_only (optional) | Boolean | If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Preview Function Point. If it equals TRUE, the function can be executed with Preview Function Point (AlchemyJ ribbon \ Preview Function Point) only. The default value is TRUE. |
The function will return:
1) Return Value: TRUE, #VALUE!
2) Return Type: Single Value
Error Scenarios
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will raise error for below scenario(s).
Error Scenarios |
---|
Data relationship header range must contain at least one column. |
Data relationship range must contain at least one column. |
Parent table name must be provide when Key is not empty. |
Parent table name does not exist in 'Table' column. |
The Multiple Row column in a data relationship range must be a Boolean. |
The From Cache column in a data relationship range must be a Boolean. |
Parent Table Name is missing. |
Either Parent Table or Key is empty is not allowed. |
Table and Parent Table cannot be the same. |
Table address cannot be empty. |
Duplicate column header in tables relationship header. |
Template path cannot be empty. |
File location cannot be empty. |