Forum Discussion

JordanBeatty1's avatar
JordanBeatty1
Qrew Captain
8 years ago

Conditional default values

I see where I can set a default value for a field, though I would like it so depending on the chosen [Activity Type] the default value for [Time Logged] is changed. So for example, [Time Logged] defaults to 0.05 for when [Activity Type] equals email, but defaults to 0.1 when [Activity Type] is phone call. Is it possible to add logic to the default value?
  • If the data entry is on a form, then you can have a form rule.

    When [Activity Type] is email
    change
    [Time Logged] to 0.05

    and then a duplicate of that for the other one as a separate Rule.
  • Mhmm, I had done this, the only thing is now I need to make the rule for each type, while I guess it is a little messy, it will work.

    Thank you!
  • Well, instead, have a single formula to calculate the default value.
    Then have a single rule that says if the [Time Logged] is blank, change it to the value in the field [calculated default value].

    Be sure to put that calculated value on the form  in a hidden field or section to be sure that the form rule sees changes to the calculated default value after the form is loaded.