Database Design Documentation
How can we help?
Full Site Search

Default Values

Setting up a Default Value

Sometimes, you might need Ragic to fill out some of your fields with Default Values, such as the current time or date, to save time and avoid errors.

You can set Default Values by clicking the link next to the Default Value option in the Design Mode, under Field Settings > Basic.

Variables Offered

You can use the variables to generate a Default Value when a record is being created or updated.

Default Value Default Formatting Variable Example
Create date yyyy/MM/dd $DATE 2015/05/19
Create time HH:mm:ss $TIME 09:21:05
Create date time yyyy/MM/dd HH:mm:ss $DATETIME 2015/05/10 09:21:05
Create year yyyy $YEAR 2015
Create month M $MONTH 5
Create weekday E $WEEKDAY 2
Create user name Name LastName $USERNAME Jane Doe
Create user e-mail email@domain.com $USERID jane@initech.com
Last modified date yyyy/MM/dd #DATE 2015/05/23
Last modified time HH:mm:ss #TIME 09:32:06
Last modified date time yyyy/MM/dd HH:mm:ss #DATETIME 2015/05/23 09:32:06
Last modified year yyyy #YEAR 2015
Last modified month M #MONTH 5
Last modified weekday E #WEEKDAY 2
Last modified user name Name LastName #USERNAME Karen Moore
Last modified user e-mail email@domain.com #USERID karen@initech.com
Sequence 1,2,3 $SEQ 3

Regarding the variables related to "Create", if Default Values are set after the record has been created, they will be triggered at the moment of adding or editing. If the field is empty, it will capture the editing user and editing time at that moment, rather than the actual creator and creation time of that record. To avoid this, it is recommended to manually Populate empty values to fetch the original created information.

Inputting Your Default Value Formatting

You can choose the Format Type options provided by Ragic, or you can directly enter text into the Formatting box below the Default Value options. You can also set a custom date format for Date fields.

Applying Formulas

You can also apply formulas to the Default Value. In the Design Mode, check the Interpret as formula below the Default Value field, then write the formula. For supported formulas, please refer to this section.

Notes

Formulas in the Default Value field will only be interpreted when the reference field is edited for the first time. Once the formula is interpreted, it will not be recalculated with further edits. If you would like the Default Value to be recalculated based on changes to the reference field, please use Formulas instead of assigning them as a Default Value.

When you turn on Auto Save in a sheet, Default Value formulas won't be applied if one formula refers to multiple fields. In such cases, it's recommended to use Formulas instead. Because when Auto Save is activated, the formula will be triggered when one of the reference fields is auto-saved, and it won't be recalculated when other fields are edited.

Using the Read Only Option

Fields with Default Values are often used in conjunction with the Read Only option to prevent users from manually changing the value.

Populating Empty Values

When your sheet already has records and you would like to add a new field with a Default Value, or you would like to change an existing Field Type to the Default Value field, Ragic will not automatically populate the Default Values to existing records according to the new configuration. Therefore, the new or newly modified field may remain empty.

If you want empty values to be automatically filled with Default Values, such as "creation date", "creator", or "exchange rate" fields, you can follow these steps in Design Mode

Step 1. Access Design Mode to add or modify the desired Default Value field.

Step 2. Save your modification

Step 3. Under the Default Value setting, select the desired Default Value field. Then click on Populate empty values.

Once you click on the Populate empty values button, Ragic will start to populate the empty values in the background. This may take a while depending on the number of records in your sheet. Feel free to navigate away from Design Mode if needed. There will be a pop-up notice in the lower-left corner of the page once the process is complete.

You will then see the default value(s) auto-populated on the Form Page.

Setting Multiple Default Values for Select User or Group Fields

When setting multiple Default Values for Select User fields, you can use "|" to separate the values. For example, by entering "Rex|Amy" as the Default Value, the field will automatically be populated the field with "Rex" and "Amy".

You can also use "|" to separate multiple values for Select Group fields.

Note: If the user or group names themselves already contain the "|", You need to use "%7C" instead.

For example, to include the groups "IT" and "RD|Senior", it should be written as follows:

Top of Page Table of Contents

Start Ragic for free

Sign up with Google