Inputting your own formatting for default values
Using with the read-only option
In some cases you might need Ragic to fill out some of your fields with a Default Value, such as the current time or date, to save time while filling entries, as well as for error avoidance.
You can set default values to applicable field types by clicking the link next to the Default Value option in Design Mode, under Field Settings > Basic.
You can use the variables offered in Ragic to generate a default value when an entry is being created or updated, or you can write a value to set as default that will populate this field in each new entry (in the case of setting a Free Text or Selection field).
|Default Value||Default Formatting||Variable||Example|
|Create date time||yyyy/MM/dd HH:mm:ss||$DATETIME||2015/05/10 09:21:05|
|Create user name||Name LastName||$USERNAME||Jane Doe|
|Create user firstname.lastname@example.org||$USERIDemail@example.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 firstname.lastname@example.org||#USERIDemail@example.com|
The above options can be directly selected from the Default Value configuration menu.
If you need customized formatting for default values, you can input text into the formatting box below the Default Value options, or can simply choose from the preselected formatting options. You have the option to set a custom date format for date fields as well.
You can also apply formulas to a default value. From the Form Page, enter Design Mode and check the box Interpret as formula below the Default Value field. Now add your formula directly into the Default Value field. For supported formulas in Ragic, please refer to the following documentation.
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 re-calculated in accordance with further edits. If you would like to have the default value re-calculated in accordance with the reference field value, please use formulas instead of adding formula as a default value. Formulas are explained in detail here.
For a similar reason, Ragic doesn’t support formulas in the default value field when one formula refers to multiple fields and you turn on autosave in a sheet. Because when autosave is activated, the formula will be triggered when one of the reference fields is auto-saved and will not be re-calculated when other fields are edited.
Fields with default values are often used in conjunction with the Read Only option to prevent users from manually changing the value.
When your sheet already has entries and you would like to add a new field with a default value, or you would like to change an existing field type to a field type that has a default value applied to it, Ragic will not automatically populate the default values to existing entries according to the new configuration. Therefore, the new or newly modified field may remain empty. If you would like to have all empty values created by username or populated with a default value such as the most recent update, you can click on the Populate empty values button under the Default Value setting in Design Mode.
Step 1. Enter Design Mode to configure your default value
Step 2. Save your modification
Step 3. Under the Default Value setting, click on the set 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 awhile 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 your screen once the process is complete.
You will then see the default value(s) autopopulated on the Form Page.