Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi Nik,
For the load data select query the question mark (?) is indeed used as a placeholder in the query. It represents the primary key or foreign key value that will be used to fetch the specific record.
This placeholder will be replaced at runtime with the actual value. The value typically comes from:
URL parameters #requestParam.paramName#
Form fields #form.tableName.parentFormId# or other static values.
Regarding the "Save Data To" SQL SELECT query your understanding is correct. This query is used to determine whether an insert or update operation should be performed. Here's how it works:
If the query returns a result (i.e., a record with the specified {id} exists), Joget will perform an update operation.
If the query doesn't return a result (i.e., no record with the specified {id} exists), Joget will perform an insert operation.
The {id} in the query is replaced with the actual id value from the form data. This allows Joget to check if a record with that id already exists in the database. Use syntax like {field_id} in query to inject submitted form data. Initially when the records are added for the first time {id} field will be empty indicating insert query has to be executed.
Hope this helps.
Hi Nik,
The ? represents the selected record id. If you use row actions then the selected row id will be taken and if you use grid action buttons then one or multiple selected rows ids will be placed where ? is written
I use the "Database SQL query" (Database SQL Query) ( formerly known as JDBC Form Binder) for form Data. I have 2 questions:
The tooltip comment (the blue ! in the label) says "Used to decide an insert or update operation. Use syntax like {field_id} in query to inject submitted form data.". I don't understand how this is used? I assume that when there is {id} then it is in edit mode otherwise it is in add new record mode so the fields are empty. Am I right?