Forum Discussion

KellyLyons1's avatar
KellyLyons1
Qrew Cadet
3 years ago

Hiding a form field using a fomula

Hi all, 

Is there a way to hide a field based on the status of another field (not using dynamic form rules), using a formula?

I have a multi-select field that shows the status of an estimate.
I want to hide the "estimate follow up date" field when my estimate status field is NOT equal to any of these:
Closed - Not Denied
Closed - See estimate notes
Closed - Unable to authorize
Closed - Cancelled
Closed - Insufficient Coverage
Closed - moved to different facility/location
Closed - Tx completed in office
Canceled - non patient
Duplicate/Void
Documentation only
Closed (CC has closed)
Canceled/Closed - Using different Doctor
Closed - Created in Error
Canceled on DOS - Closed
Closed - Duplicate est created

Otherwise I want this field to be displayed on my form.

Any ideas?


------------------------------
Kelly Lyons
------------------------------
  • What type of field is [estimate follow up date]?  If it's a formula field this is easy with an IF statement.  If it's just a date field, the only way to hide it would be with dynamic form rules.

    ------------------------------
    Jeff Peterson
    ------------------------------
  • It sounds like what you are asking can be done with a Form Rule.  Why are you not using the Form Rules?  You will just have to set up the Rule's Condition multiple times for each value.

    Multiple Conditions
    and   of the following conditions are true:
    when EstimateStatus is not equal to "Closed - Not Denied"
    when
    EstimateStatus is not equal to "Closed - See estimate notes"
    show
    EstimateFollowUpDate

    Otherwise, it is easy to do the same thing in a Formula - Date or Formula - Text field using the If() function.  Just pick Text or Date depending on how you are using that Field.  You will need to do something like this:
    var Text splitValue = "; ";
    var TextList valuesNotAllowed = Split("Closed - Not Denied; Closed - See estimate notes; Closed - Unable to authorize", $splitValue);
    var Bool notAllowed = Contains($valuesNotAllowed, [Estimate Status]);
    
    If($notAllowed, "", [estimate follow up date])


    ------------------------------
    Joel Hickok
    ------------------------------