... |
... |
@@ -45,33
+45,6 @@ |
45 |
45 |
|
46 |
46 |
Further we recommend you use the script function [[getDataQuery>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.AdditionalScriptFunctions.GetDataQuery]], so you do not have to setup the servlet request manually. The result of the database query is returned as //JSON//. |
47 |
47 |
|
48 |
|
-== Testen der Abfrage == |
49 |
|
- |
50 |
|
-{{info}} |
51 |
|
-For quick testing of the query the shortcut {{code}}Ctrl + Enter{{/code}} is provided. |
52 |
|
-{{/info}} |
53 |
|
- |
54 |
|
-Database queries can be tested directly from the configuration UI. For this purpose a test console is provided below the SQL editor (see [[figure>>||anchor="fig_data_db_query"]]). |
55 |
|
-In the header of the console ther is a row of buttons for controling the query: |
56 |
|
- |
57 |
|
-* {{ficon name="database-search"/}}**Perform query** |
58 |
|
-Runs the database query. If //query parameters// ({{code}}?{{/code}}) are provided the user will be prompted to input values vor those parameters. Otherwise the result of the query will be displayed directly in the //table view//. |
59 |
|
-{{lightbox image="data_db_query_test_en.png" title="Run the given query"/}} |
60 |
|
-* {{icon name="question"/}}**Query parameters** |
61 |
|
-Mask for inputting values for query parameters. This option is only available if query parameters ({{code}}?{{/code}}) are used in the SQL query. The individual parameters will be enumerated in the SQL query. Clicking "User parameters for query" {{ficon name="arrow-right-bold-circle-outline2"/}} executes the query with the given parameters. The result will be displayed in the //table view//. |
62 |
|
-{{lightbox image="data_db_query_test_param_en.png" title="Query parameters are enumerated"/}} |
63 |
|
-Actual Query in the SQL editor: |
64 |
|
-{{lightbox image="data_db_query_example_de.png" title="Example query"/}} |
65 |
|
-* {{ficon name="table-large"/}}**Table view** |
66 |
|
-Query result in table view |
67 |
|
-{{lightbox image="data_db_query_test_table_en.png" title="Query result in table view"/}} |
68 |
|
-* {{icon name="code"/}}**Source code view** |
69 |
|
-Query result in JSON format |
70 |
|
-{{lightbox image="data_db_query_test_code_en.png" title="Query result in JSON format"/}} |
71 |
|
-* {{icon name="Terminal"/}}**Generated SQL** |
72 |
|
-Displays the generated SQL statement with input parameter values |
73 |
|
-{{lightbox image="data_db_query_test_sql_en.png" title="Displays the generated SQL statement with input parameter values"/}} |
74 |
|
- |
75 |
75 |
== Selection form elements == |
76 |
76 |
|
77 |
77 |
If you want to display the returned data as options of a [[selection element>>doc:Formcycle.FormDesigner.FormElements.Selection]], you can do so easily by opening the {{designer/}} and selecting the database query as the data source of the selection element. |