Using Counters
About Counters
You can manage counters for existing business objects and set up counters for new business objects.
Counters are usually used in association with a business object field, usually in an initialization business rule to set the initial value and then get the next specified incremental value, using the GetNextCounter() function.
Viewing Counters
- From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
- From the right pane, click View Counters. The application displays the list of existing business objects with counter values, with the following information:
Option | Description |
|---|---|
Name | Name of the counter |
Initial value | The first integer value for the counter. This could also be a negative number. Counter length is limited to 9 digits. |
Increment | The incremental counter value for the next record. |
Current value | The current value for the most recent record. |
Last Modified | The time and date that this counter was modified. |
Modified by | The login name of the user who last modified the record. |
- Click the name of the counter to view the record and modify any values.
Resetting a Counter
When resetting the counter or modifying counters for existing records, try not to create duplicate records. To prevent duplication, you can reset the counter to a value that is currently higher than the number shown in the Current Value field.
- From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
- From the right pane, click View Counters.
- Click a counter from the list. The application displays the counter details page.
- To set the counter number to 0, click Reset counter to start the counter at the new base value, and accept the confirmation message.
- Click Save.
Creating a Counter
- From the Configuration Console, click Build > Business Objects to open the Business Objects workspace.
- From the right pane, click View Counters.
- Click Add new.... The application displays a blank counter form.
- Enter information into the fields.
Field | Description |
|---|---|
Name | Name of the counter. This is the name that is used in the initialization business rule for the business object to get the next counter value. |
Base Value | The first or initial integer value for the counter. This could also be a negative number. Counter length is limited to 9 digits. |
Increment | The incremental counter value for the next record. |
- Click Save.
