• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Hide button based on field value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide button based on field value

    I am trying to hide a button on a form based on the value of a field, but it doesn't seem to be working. The field name is carrier and I have set up the app variable with the expression below and linked it to the button. However, this doesn't work. Any ideas on what might be the issue?


    var carrier = rec.get('CARRIER');
    appVar.hideBolButton = (carrier === 'LTL') ? false : true;??

  • #2
    The proper way to accomplish this would be as follows:
    • Create an app variable to hold the value of your form field. For this example, I will call it "carrierValue".
      • Link this app variable to the "Get Value" property of your form field.
    • Keep the existing hideBolButton app variable. I assume this is already linked to the Hide property of the button.
      • Expression should be
        Code:
        return appVar.carrierValue !== 'LTL'

    Comment


    • #3
      That worked, thank you!

      Comment

      Working...
      X