← Return to the list of available actions
If you have a problem understanding how the action works, check: Action, Conditional execution, Components parameters
Category: Database
Action location: Form, Button, Variable
Previous names: Perform a query from the database
Available from version: 1.0.4
The action retrieves the SQL query from the database, executes it and assigns the results to variables whose identifiers correspond to the column aliases in the database.
Places in the database query, where the values from parameters defined by us are to be marked, are marked with "?" If several parameters are defined, the order in which the parameters are defined determines where each value will go.
It should be remembered that writing data to the dynamic table is possible only after passing the table identifier in the last parameter.
In the absence of data returned from the database, the component sets no value.
Leaving an empty conditional field is equal to setting it to "true".
Action location | From version | Conditional execution parameter action | Action call-up condition |
---|---|---|---|
Form | 1.0.32 | Call-up action | The "Conditional execution" parameter will return "true" |
Variable | 1.0.4 | Activates action | Change the value of the variable on which the action is located |
Button | 1.0.4 | Activates action | Pressing the button |
Parameter name | From version | Description | Paremeter type | Default value | Field type | Comments and restrictions | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Database | 1.0.4 | The configuration name defined in the data explorer settings. | Text | Editable field |
| |||||||||
Table with queries | 1.0.4 | The name of the table in which queries triggered by the application are stored. | Text | Editable field | The parameter is optional. If we do not complete it, the question is taken from here: Table with database queries | |||||||||
Query Name* | 1.0.4 | ID of the query stored in the database. | Text | Editable field | ||||||||||
Parameters for the query | 1.0.4 | An array of text values storing variables / constants for query parameters and type information. An example parameter is "value type" for constants and "@id_variable" for variables. When we want to pass a constant value that has more than one word, we write it in quotation marks "" or "'. Supported types are: string, integer and float. | An array of text values | Editable field | Since version 1.0.24 it is possible not to pass any parameters to the query. | |||||||||
Target Variables* | 1.0.4 | Array of variables into which the values from the database are to reach. Binding based on the variable id and returned alias from the database. | Array of variables | Editable field | ||||||||||
Dynamic table id | 1.0.4 | An optional parameter conditioning the saving of result data to a dynamic table. | Text | Editable field | ||||||||||
Multiple value support | 1.0.11 | An optional parameter that allows handling of many values returned by the database dedicated to one header variable. | Text | Drop-down list | Possible parameter values:
| |||||||||
Way of adding data* | 1.0.83 | Parameter that allows you to specify the way of adding data. There are 3 types to choose from:
| Text | Add values | Drop-down list |
Parameter*- mandatory field
1.0.4
- Adding a component
1.0.9
- IE error fixing
- Adding support for '' and '' in the passed parameters
1.0.10
- Setting the default data retrieval from the pm_dbqueries table
1.0.11
- Added support for multiple values saved to form variables
1.0.14
- Adaptation of actions to the Oracle database
1.0.16
- Polish characters support
1.0.18
- Correction of the integer conversion error
1.0.21
- Adding a parameter that allows overwriting data in a dynamic table
1.0.24
- Adding the option to run a query without parameters
1.0.43
- Blocking the option of adding an action under the accept button
- Changing the name from "Executing a query from the database" to "Performing a query retrieving data from the database"
1.0.49
- Adding a dynamic form with a combobox for the multi-value parameter
- Fixing the error of setting the total value on Oracle
1.0.53
- Refreshing the table after downloading data to it
1.0.54
- Improved handling of the situation when a table or column was not found in the database
1.0.63
- Improved handling of the situation in which the variable passed in the query parameter was not found
1.0.83
- Changing "Data Overwrite" parameter to "Way of adding data"
1.0.X
- Improved retrieving parameter values from form variables
Improved mapping of Boolean type variables
Fixed error related to mapping of values when "Get the first value" option is selected in Multiple value support
Add Comment