Form Data API - How to get the primaryKeyValue

Confluence User - 20 Nov, 2024

Hi everyone, I have a question regarding this form data API, may i know that what is the primary key value? how can i get the primary key value for the form record? Thanks.

forms;api

2


20 Nov, 2024 •
confluenceUser •
1 •
confluenceUser •

Hi Amanda, A Primary key is a unique identifier for each database table record. It ensures each record can be uniquely identified and referenced. no two records can have the same primary key.

In Joget:

  1. You can use ID Generator Field to generate the primary key or
  2. Add a field in your Joget form, set the ID to "id" - Joget will then use the "id" value you set as the primary key.
  3. Or don't configure any field - by default Joget will generate a primary key (as shown in screenshot) for records saved in the form table


Getting the primary key: One way is to create a datalist and add the id column which shows the primary key. Other ways would be accessing it via form data hashvariables etc. Hope this helps.

21 Nov, 2024 •
confluenceUser •
•
confluenceUser •

Hi Varnaa, thank you so much for your help!

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print