...
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:
...
- Start the Joget Server and open the App Center.
- Log in as admin and click on the pencil icon on the Expenses Claim to open the Design App. (see Figure 1)
Figure 1 - Under FORMS column, click on Expense Claim New (see Figure 2)
Figure 2 - 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)
Figure 3 - Take note of the Format
- To see it working, head back to the Design App and click the Launch button in the Userview column.
- Click on Create a New Expense Claim button on the Dashboard, fill up the necessary details and click Continue Next Screen button.
- Click on Save As Draft button.
- 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)
Figure 1
...
Figure
...
Figure 3
...
- 4
ID Generator Field Properties
Edit ID Generator Field
Name | Description | Screen (Click to view)||||||
---|---|---|---|---|---|---|---|
ID | Element ID (By declaring as "ref", a corresponding database table column "c_ref" will be created)
| ||||||
Label | Element Label to be displayed to the end-user. | ||||||
Environment Variable Name | Name of the environment variable to be used to keep the running number. | ||||||
Format | Determines the pattern of the generated value (e.g., "REF-?????" will yield "REF-00001") |
Advanced Options
Name | Description | Screen (Click to view) | ||||||
---|---|---|---|---|---|---|---|---|
Hidden? | Determines if the element should be made visible in the form. | |||||||
Workflow Variable | If the form is part of a workflow process, upon saving of the form (by clicking on "Save as Draft" or "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.
|