Discussions

Expand all | Collapse all

Conditional default values

  • 1.  Conditional default values

    Posted 06-08-2017 13:29
    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?


  • 2.  RE: Conditional default values

    Posted 06-08-2017 13:38
    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.


  • 3.  RE: Conditional default values

    Posted 06-08-2017 13:44
    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!


  • 4.  RE: Conditional default values

    Posted 06-08-2017 13:51
    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.


  • 5.  RE: Conditional default values

    Posted 06-08-2017 14:05
    Yes, this seems to be a cleaner approach,
    Thank you!