Skip to end of metadata
Go to start of metadata

 

  ← Return to the list of available actions

If you have a problem understanding how the action works, check: ActionConditional executionComponents parameters

Basic information

Category: Database

Action location: Form, Button, Variable

Previous names: Perform a query from the database

Available from version: 1.0.4

Description

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.

Action call-up

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"

Variable1.0.4Activates actionChange the value of the variable on which the action is located

Button

1.0.4

Activates action

Pressing the button

Configuration parameters

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 queries1.0.4

The name of the table in which queries triggered by the application are stored.
The table should contain the columns query_name (query ID) and query (query only). First, the action tries to search for a table from the system base. If the search fails, a search is made in the defined database.

Text Editable fieldThe parameter is optional. If we do not complete it, the question is taken from here: Table with database queries
Query Name*1.0.4ID of the query stored in the database.Text Editable field 
Parameters for the query1.0.4An 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 fieldSince version 1.0.24 it is possible not to pass any parameters to the query.
Target Variables*1.0.4Array 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 id1.0.4An optional parameter conditioning the saving of result data to a dynamic table.Text Editable field 
Multiple value support1.0.11An optional parameter that allows handling of many values returned by the database dedicated to one header variable.Text Drop-down list

Possible parameter values:

Displayed ValueValue transmitted
Throw an exceptionBLOCK
Get the first valueFIRST
Get unique values separated by a semicolonUNIQUE
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:

  • Overwrite entire table- all values in the table are overwritten,
  • Overwrite updated columns- all values in the column specified in the query are overwritten,
  • Add values- values taken from DB are added to the existing ones.
TextAdd valuesDrop-down list 

Parameter*- mandatory field 

Configuration example

Change log

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

  • No labels
Write a comment…