Ragic Logo
<< Field types Table of Contents Cascaded selection >>

Auto generated field values

Setting your Field to be Automatically Generated

When you set a field type as Auto Generate, the value of the field will be automatically generated by Ragic. This is a great help for generating system ID and document numbers.

You can start by choosing a sequence format in the formatting box below and see how the generated value is like in the example area. To understand this formatting structure, we could analyze how Ragic responds to parts of these sequences.

Example: Quote with Date

The following sequence format is written for a quotation's document number:

QUOTE-{1,date,yyyyMMdd}-{0,number,000}

Two variables are provided to generate the pattern;

the {0,number,000} is a serial number,

and the {1,date,yyyyMMdd} is the date that the value is generated.

When the date variable is not present, the number variable will be a count of quotations generated.

For example if the pattern is:

QUOTE-{0,number,000}

The generated document number will be:

QUOTE-001

QUOTE-002

QUOTE-003

...

If the date variable is present, the number variable will be a count of quotations generated under the same date string. For example, if the pattern is:

QUOTE-{1,date,yyyyMMdd}-{0,number,000}

The generated document on 2013/5/8 will be:

QUOTE-20130508-001

QUOTE-20130508-002

QUOTE-20130508-003

...

On the next day it will be:

QUOTE-20130509-001

QUOTE-20130509-002

QUOTE-20130509-003

...

If we change the format to:

QUOTE-{1,date,yyyyMM}-{0,number,000}

Then the quotation generated on 2013/5/8, and 2013/5/9 will be:

QUOTE-201305-001

QUOTE-201305-002

QUOTE-201305-003

QUOTE-201305-004

QUOTE-201305-005

QUOTE-201305-006

...

The sequence will only be reset in the following month:

QUOTE-201306-001

QUOTE-201306-002

QUOTE-201306-003

...

Resetting the Sequence

You can reset or change the status of the automated sequence in the auto generate setting through the Sequence Status at the bottom of the left panel in the Design Mode.

Enter the sequence number you want to start from and click the Set current seq button. If you would like to view the current sequence number, click on Get current seq. This is especially useful when you have a sequence that you're using in Ragic but would like to import data from another source, and then continue with the current sequence.

Populating Empty Values

Ragic has the ability to populate empty autogenerate fields according to the set sequence.

You can run this for an autogenerate field in the form page design mode, in the bottom of the Field Settings > Basic panel.

This feature can be used if you don't already have a key identifier for your records when you import your data from spreadsheets.

Sequence Patterns

For more information on the formatting of these sequence patterns that are based on Java MessageFormat, you may visit the Java MessageFormat class page.

Top of Page
<< Field typesTable of ContentsCascaded selection >>
Learn more about Ragic: Why we created Ragic | Webinars | User Guide.
Keep in touch: Blog | Email | Facebook | Twitter.
Ragic, Inc. | +1 888-666-8037 | Terms | Privacy