Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The ID Generator Field is used to produce a running number based on an Environment variable.  To learn more about its usage, refer to Generate Reference ID.

Note

You will only need to do this if you are using MySQL, as other databases already default to "READ-COMMITTED".

Run the following queries in MySQL.

SET GLOBAL tx_isolation='READ-COMMITTED';
SET SESSION tx_isolation='READ-COMMITTED';


You will also need to set the following in your my.cnf/my.ini file.
[mysqld]
transaction-isolation = READ-COMMITTED

...

The easiest way to see how the ID Generator Field works are to use the existing built-in App Expenses Claims. Here are the steps:

StepsScreens (Click to view)
  1. Start the Joget Server and open the App Center.

  2. Log in as admin and click on the pencil icon on the Expenses Claim to open the Design App. (see Figure 1)

  3. Under FORMS column, click on Expense Claim New (see Figure 2)

  4. Hover the mouse over the ID Generator Field element on the canvas and click on Edit to open up the Edit ID Generator Field properties. (see Figure 3)

  5. Take note of the Format

  6. To see it working, head back to the Design App and click the Launch button in the Userview column.

  7. Click on Create a New Expense Claim button on the Dashboard, fill up the necessary details and click Continue Next
Screen
  1. Screen button

  2. Click on Save As Draft button.

  3. Go to My Expenses on the menu to the left and click on My Inbox.  Here you can see the ID generator has generated a 4 digit running number (as defined in the Format field in steps 4 & 5) under the # column. (see Figure 4)

Image Modified

Figure 1


Image Modified

Figure 2


Image Added

Figure 3


Image Added

Figure 4


ID Generator Field Properties

...