Skip to main content

🕵🏻‍♂️ The Case of the Missing Defaults: An Entity Widget Mystery

Introduction: 

Default value formulas in slate can be a useful way to pre-fill form fields using contextual data like Todays date (@Today) or record specific values. However, due to the more abstract nature of entity widget forms you may have noticed that these formulas do not work. This article will equip you with the knowledge you need to understand how default value formulas work, why they behave differently on entity widget forms and practical alternatives you can use today!


How Default Value Formulas Work:

As you may know default fault value formulas populate a field value the moment the form loads using the forms environment and available context. 

Examples of default value use case:

  • @today to set current date
  •  Pulling the current signed in User’s information
  •  Using other Slate formula functions tied to a form load

How Entity Widget Forms Differ:

Entity widget forms are designed to be used for list-style, child record data entry within a parent record 

Entity Widget Examples:

  • “Academic Notes” entity associated with a Person record 
  • “Programs” entity associated with an Application record 

Key Differences in form Scope:

  • Entity widget forms are Embedded inside the parent record
  • Dynamic row creation: Every “Add Row” action opens a embedded row specific form.
  • No Sigle form load event: Each row is created independently and at different times from parent page load. 

Why This Limitation Exists:

Technical Reason:

 Default value formulas rely on being able to reference the form environment at load time. In entity widgets, new rows are generated after the parent page has loaded, so no consistent “form load” trigger exists for formulas.

Design Philosophy:

Entity widgets are meant for user-driven, variable entry, where automatic pre-fills are often irrelevant or even misleading. 

How can you work around this issue

Although formula-based defaults aren’t available in entity widget forms there are other options at your disposal:

  • Calculation Formulas - which update each time fields on the form are changed 
  • Static Default Values (Not to be used for Unique Identifiers/Entity Row Keys) 
  • Place Holder Text to assist form submitters with desired inputs. 

Summary

 Default value formulas do not work in entity widget forms because these forms are dynamic, row-based, and created after page load, which removes the consistent environment formulas depend on. This design ensures predictable, user-controlled data entry.