* *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table
* *importToTable* = <[db.]tablename> - **Required**. Providing this parameter activates the import. If the table
doesn't exist, it will be created.
doesn't exist, it will be created.
* *importToColumns* = <col1>,<col2>,... - If none provided, the Excel column names A, B, ... are used. Note: These
* *importToColumns* = <col1>,<col2>,... - If none provided, the Excel column names A, B, ... are used. Note: These
have to match the table's column names if the table already exists.
have to match the table's column names if the table already exists.
* *importRegion* = [tab],[startColumn],[startRow],[endColumn],[endRow]|... - All parts are optional (default:
* *importRegion* = [tab],[startColumn],[startRow],[endColumn],[endRow]|... - All parts are optional (default:
entire 1st sheet). Tab can either be given as an index (1-based) or a name. start/endColumn can be given either
entire 1st sheet). Tab can either be given as an index (1-based) or a name. start/endColumn can be given either
numerically (1, 2, ...) or by column name (A, B, ...). Note that you can specify several regions to import.
numerically (1, 2, ...) or by column name (A, B, ...). Note that you can specify several regions to import.
* *importMode* = `append` (default) | `replace` - The data is either appended or replace in the specified table.
* *importMode* = `append` (default) | `replace` - The data is either appended or replace in the specified table.
* *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the
* *importType* = `auto` (default) | `xls` | `xlsx` | `ods` | `csv` - Define what kind of data should be expected by the
Spreadsheet Reader.
Spreadsheet Reader.
* *importNamedSheetsOnly* = <comma separated list of sheet names>. Use this option if specific sheets cause problems
* *importNamedSheetsOnly* = <comma separated list of sheet names>. Use this option if specific sheets cause problems
during import and should be skipped, by naming only those sheets, who will be read. This will also reduce the memory
during import and should be skipped, by naming only those sheets, who will be read. This will also reduce the memory
usage.
usage.
* *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical
* *importSetReadDataOnly* = 0|1. Read only cell data, not the cell formatting. Warning: cell types other than numerical
will be misinterpreted.
will be misinterpreted.
* *importListSheetNames* = 0|1. For debug use only. Will open a dialog and report all found worksheet names.
* *importListSheetNames* = 0|1. For debug use only. Will open a dialog and report all found worksheet names.
Immediately after the upload finished (before the user press save), the file will be checked on the server for it's
Immediately after the upload finished (before the user press save), the file will be checked on the server for it's
...
@@ -4376,17 +4383,17 @@ These type of 'action' *FormElements* will be used to implement data validation
...
@@ -4376,17 +4383,17 @@ These type of 'action' *FormElements* will be used to implement data validation
Types:
Types:
* beforeLoad (e.g. good to check access permission)
* beforeLoad (e.g. good to check access permission)
* afterLoad
* afterLoad
* beforeSave (e.g. to prohibit creating of duplicate records)
* beforeSave (e.g. to prohibit creating of duplicate records)
* afterSave (e.g. to to create & update additional records)
* afterSave (e.g. to to create & update additional records)
* beforeInsert
* beforeInsert
* afterInsert
* afterInsert
* beforeUpdate
* beforeUpdate
* afterUpdate
* afterUpdate
* beforeDelete (e.g. to delete slave records)
* beforeDelete (e.g. to delete slave records)
* afterDelete
* afterDelete
* paste (configure copy/paste forms)
* paste (configure copy/paste forms)
.. _sqlValidate:
.. _sqlValidate:
...
@@ -4395,49 +4402,50 @@ Parameter: sqlValidate
...
@@ -4395,49 +4402,50 @@ Parameter: sqlValidate
Perform checks by firing an SQL query and expecting a predefined number of selected records.
Perform checks by firing an SQL query and expecting a predefined number of selected records.
* OK: the `expectRecords` number of records has been selected. Continue processing the next *FormElement*.
* OK: the `expectRecords` number of records has been selected. Continue processing the next *FormElement*.
* Fail: the `expectRecords` number of records has not been selected (less or more): Display the error message
* Fail: the `expectRecords` number of records has not been selected (less or more): Display the error message
`messageFail` and abort the whole (!) current form load or save.
`messageFail` and abort the whole (!) current form load or save.
*FormElement.parameter*:
*FormElement.parameter*:
* *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement* names: only if all of those elements are filled
* *requiredList* = `<fe.name[s]>` - List of `native`-*FormElement* names: only if all of those elements are filled
(!=0 and !=''), the *current* `action`-*FormElement* will be processed. This will enable or disable the check,
(!=0 and !=''), the *current* `action`-*FormElement* will be processed. This will enable or disable the check,
based on the user input! If no `native`-*FormElement* names are given, the specified check will always be performed.
based on the user input! If no `native`-*FormElement* names are given, the specified check will always be performed.
* *sqlValidate* = `{{<query>}}` - validation query. E.g.: `sqlValidate={{SELECT id FROM Person AS p WHERE p.name LIKE {{name:F:all}} AND p.firstname LIKE {{firstname:F:all}} }}`
* *sqlValidate* = `{{<query>}}` - validation query. E.g.: `sqlValidate={{SELECT id FROM Person AS p WHERE p.name LIKE {{name:F:all}} AND p.firstname LIKE {{firstname:F:all}} }}`
* *expectRecords* = `<value>`- number of expected records.
* *expectRecords* = `<value>`- number of expected records.
* *expectRecords* = `0` or *expectRecords* = `0,1` or *expectRecords* = `{{SELECT COUNT(id) FROM Person}}`
* *expectRecords* = `0` or *expectRecords* = `0,1` or *expectRecords* = `{{SELECT COUNT(id) FROM Person}}`
* Separate multiple valid record numbers by ','. If at least one of those matches, the check will pass successfully.
* Separate multiple valid record numbers by ','. If at least one of those matches, the check will pass successfully.
* *messageFail* = `<string>` - Message to show. E.g.: *messageFail* = `There is already a person called {{firstname:F:all}} {{name:F:all}}`
* *messageFail* = `<string>` - Message to show. E.g.: *messageFail* = `There is already a person called {{firstname:F:all}} {{name:F:all}}`
.. _slave-id:
.. _slave-id:
Parameter: slaveId
Parameter: slaveId
""""""""""""""""""
""""""""""""""""""
*FormElement.parameter*:
FormElement.parameter
;;;;;;;;;;;;;;;;;;;;;
* *slaveId* = `<id>`:
* *slaveId* = `<id>`:
* Auto fill: name the action `action`-*FormElement* equal to an existing column (table from the current form definition).
* Auto fill: name the action `action`-*FormElement* equal to an existing column (table from the current form definition).
*slaveId* will be automatically filled with the value of the named column.
*slaveId* will be automatically filled with the value of the named column.
* If there is no such named column name, set *slaveId* = `0`.
* If there is no such named column name, set *slaveId* = `0`.
* Explicit definition: *slaveId* = `123` or *slaveId* = `{{SELECT id ...}}`
* Explicit definition: *slaveId* = `123` or *slaveId* = `{{SELECT id ...}}`
Note:
Note:
* `{{slaveId:V}}` can be used in any query of the current *FormElement*.
* `{{slaveId:V}}` can be used in any query of the current *FormElement*.
* If the `action`-*FormElement* name exist as a column in the master record: Update that column *automatically* with the
* If the `action`-*FormElement* name exist as a column in the master record: Update that column *automatically* with the
recent slaveId
recent slaveId
* After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*.
* After an INSERT the `last_insert_id()` becomes the *{{slaveId:V}}*.
* `fillStoreVar` is fired first, than `slaveId`.
* `fillStoreVar` is fired first, than `slaveId`.
* If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`.
* If `slaveId` is known in `fillStoreVar`, set: `slaveId={{someId:V}}`.