Skip to main content
All CollectionsFAQsBuilding 👷‍♂️
Calculated Values Vs Custom Default Value
Calculated Values Vs Custom Default Value

Lets explore when you would use a calculated value vs a custom default value

Updated this week

When setting the value of a component programmatically, you can choose between the Calculated Value property and the Custom Default Value property. Understanding the difference between the two is essential to avoid unintended behavior, such as a field updating when you don’t want it to.

For example, if you set a Calculated Value to display the logged-in user using the expression value = tf.user.name, it will show the user currently viewing the form—not the user who initially submitted the response.

The key difference lies in when these values are evaluated:

• Calculated Value: Re-calculated dynamically every time there’s a change.

• Custom Default Value: Evaluated only once when the form is initialized.

Which property you should use depends on whether you want the value to be re-calculated. In the example above, using a Calculated Value would cause the expression to re-evaluate whenever the form is opened, resulting in the field displaying the viewer of the form instead of the original submitter. For this scenario, a Custom Default Value is the better choice.

Did this answer your question?