Database Design Documentation
How can we help?
Full Site Search

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 IDs and document numbers.

You can start by choosing a sequence format in the formatting box below and see what 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.

Generate Sequence Numbers Based on the Specified Selection or Date Field Value

You can also set Auto Generate Field to generate sequence numbers based on the specified selection field or date field value.

For example, you would like to generate sequence numbers for sales orders based on sales groups in order to categorize and review the performance of each group.

Note: If your auto-generate field’s values are based on the values on a date field, the date format of the auto-generated values will be in accordance with the format set on the referenced date field. If you would like to apply another date format on your auto-generate values, you would need to create another date field with the format you would like to apply on your auto-generate field and set formulas to have both date fields equal to each other. After that is completed, you can set your auto-generate field to reference that new date field.

Example: Quote with Date

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


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:


The generated document number will be:





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:


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





On the next day it will be:





If we change the format to:


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








The sequence will only be reset in the following month:





Get entry URL

On the field settings' formatting list, scroll down and choose "Record URL" format.

With this format, the system will auto-populate the field with the URL of each entry created in the sheet.

The unique value of each record (RAGIC_ID)

RAGIC ID is the unique value that Ragic uses to distinguish each record, which is the last parameter in the record URL. For example, if the record URL is "!/20001/7", the last "7" is the record's RAGIC ID.

If your sheet does not have a unique value field, you can consider using RAGIC ID as the unique value for importing or exporting data, and the downloaded Excel backup file of the sheet will also include the RAGIC ID.

The unique value of each subtable record (SUBTABLE_RAGIC_ID)

SUBTABLE RAGIC ID is the system-assigned number used to identify each subtable record. It also serves as the numeric suffix in the URL when generating a new form for that particular subtable. For example: in, the "33" at the end represents the SUBTABLE RAGIC ID for that record. This format is applicable only to subtable fields.

If you are in New Sheet From Subtable, selecting RAGIC ID will generate the same value.

Resetting the Sequence

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

Enter the sequence number you want to start from and click the Set seq of next record button. If you would like to view the current sequence number, click on Get seq of next record. 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.

If you check the "Generate sequence based on another field", you will be able to Get seq of next record or Set seq of next record for each option. You can see there are "field options" below and you can set the sequence for all options individually. For example, you have "Apparel", "Banking", and "Chemicals" in the field options. You can set the sequence for "Apparel" first:

After you finish setting up for "Apparel", you can choose other options like "Banking" or "Chemicals" to set up the sequence:

Populating Empty Values

Ragic has the ability to populate empty autogenerate fields according to the set sequence. You can add this setting for the autogenerate field in the form page's design mode, and then go to the bottom of the Field Settings > Basic panel.

If you check the "Generate sequence based on another field:", the system will generate sequence numbers for all the options. For example, if there are no sequence numbers in all the options "A" "B" and "C" and you click "Populating Empty Values", you will see all the options generate their own sequence numbers. You will see A-00001, B-00001, C-00001, A-00002, B-00002, C-00002...etc.

If you didn't select any options in another field but have selected "Populating Empty Values", the system will still generate sequence numbers without the option. As you can see in the example below, the field value is "-00001".

This feature can be used when you haven't created 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 Table of Contents

Start Ragic for Free

Sign up with Google