Set a default value
Before you start
Set a default value when most records start with the same value, such as a quantity of 1 or a request source of “Employee portal”. The default can be plain text or a Smart Script. Beezr applies it when a record is created and the field is empty.
Set a default
Section titled “Set a default”- Open Modules, choose the module, and click the field’s row on the Fields page. The editor opens.
- Scroll to Default value and click + Add a default value. A script box opens.
- Type the value. Use Ctrl + Space for suggestions.
- Click Save field.
The Default column of the Fields page now shows a tick for the field. Point at the tick to see the value.
To remove a default, open the field, click Remove default under the script box, and save. The key field has no Default value section.
What can I type?
Section titled “What can I type?”You can type plain text or a Smart Script. Beezr runs what you type as a script. If it isn’t valid script, Beezr uses the text exactly as typed.
| You want | Type | Field type |
|---|---|---|
| Every request to start as an employee request | Employee portal | Text |
| A quantity that starts at 1 | 1 | Integer |
| A title built from two other fields | see the script below | Text |
A script can read other fields on the record. Write the full token, $table$.$field$, and copy the table name from the Modules page. Text fields arrive already in quotes, so you add none of your own.
$cm_equipment_requests_base$.$item$ + ' for ' + $cm_equipment_requests_base$.$requested_for$When a script does arithmetic, wrap each field in parseInt() or parseFloat(), with no quotes around the token.
parseFloat($cm_invoices_base$.$net_amount$) * 0.15When does Beezr apply the default?
Section titled “When does Beezr apply the default?”Two things happen, and which one you see depends on the type.
| Type | On the form when it opens | At save |
|---|---|---|
| Integer, Long, Decimal | The default, run as a Smart Script. 0 if there is none | If the field is empty |
| Boolean | The default as typed. false if there is none | If the field is empty |
| Lookup, Multi select lookup, User, Content, Multi content, Signature | The default as typed | If the field is empty |
| Relation | The default, only when it has no $...$ token | If the field is empty |
| Text, Text area, Rich text, Currency, Date, Date time, Link, Rating, Barcode | Filled in when saved | If the field is empty |
A default on a Text field appears once the record is saved with that field left empty. Test it by saving a new record.
What should I watch for?
Section titled “What should I watch for?”For a number worked out from other fields, use a smart field.
Check yourself
What's next
Last checked