Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/release-notes/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* xref:4.2@insights:widgets:list-and-map.adoc[Support LIST and MAP query parameter types] - This allow users to create widgets in Insights that use GSQL queries with list or map parameters.
* xref:4.2@insights:intro:applications.adoc#_print_application_page[Application page printing] - Users can now generate a printed version of the application page.
* [4.2.1] xref:4.2@insights:widgets:global-variables.adoc[Add support for global variables] - This allows users to create global variables that can be used across multiple widgets in the same application.
* [4.2.2] xref:4.2@insights:widgets:action-form.adoc[Input Widget Improvements] - Add a submit button to the input widget, enabling users to explicitly apply changes and trigger parameterized queries. This allows one-time create, update, or delete actions, making environments more dynamic for both business workflows and demo scenarios.


// = 4.1
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/widgets/images/action-form-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions modules/widgets/pages/action-form.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
= Action Form

Action Form differs from ordinary idempotent input binding that triggers query logic; Action Form is more suitable for executing queries with side effects, where the relevant parameters for executing the query come from the associated bound inputs. It can be used to create, update, or delete records in a database, or to perform any other action that requires user input.

If you want to create an action form, you can find it in the Advanced section of the input widget configuration in Insights. There are three types of Submit Type, as shown below.

* `No submit` This is the default behavior for all input widgets that do not have an action form set; there will be no submit action.
* `Submit to query` This will trigger the execution of a query with side effects, such as creating, updating, or deleting records in a database. The relevant parameters for executing the query will come from the associated bound inputs.
* `Submit to page` This will navigate to another page in the application, passing along any relevant parameters from the associated bound inputs.

image::action-form-settings.png[]

== Submit to query

If you select the 'Submit to query' type, there are three related parameters that need to be filled out here. Additionally, if the related query has parameters, you need to bind the parameter values to the inputs.

image::action-form-param-bindings.png[]

It is important to note that there is a type matching validation between query parameters and inputs. If the parameter types do not match, the input cannot be selected.

image::action-form-select-options.png[]

Here are the relevant types of matches:

* `String`, `Datetime`, `Bool` These three types will match whether they are of the same type.
* `Uint`, `Int`, `Int64`, `Int8`, `Double`, `Float`, `Real`, `Number` These numeric types will match with each other.
* `Vertex` This type will match with `Vertex type`.
* `List` and `Set` are compatible, and they will also check if the `Element Type` matches.
* `Map` This type will match with `Key type` and `Value type`.

== Submit to page

If you select the 'Submit to page' type, you need to choose the page to which you want to redirect. Additionally, if the related page has parameters, you need to bind the parameters of the redirect page to the inputs on this page.

image::action-form-submit-to-page.png[]

Similarly, `Submit to page` will also check if the types of the redirect page parameters match, just like `Submit to query` mentioned above.