Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Some fields are needed on the screen only when another field has a certain value. Keeping the fields visible on the screen when they are not needed creates clutter and may cause users to enter information in the wrong place.

Solution

You can solve this problem using Power Scripts™ Live Fields. The scripts will get the value of a customized and based on that value it will conditionally show or hide other fields.

...

Code Block
if(argv["customfield_xxxx"] == "ABC") {
    lfHide("customfield_1111");
    lfHide("customfield_2222");
    lfHide("customfield_3333");
} else {
    lfShow("customfield_1111");
    lfShow("customfield_2222");
    lfShow("customfield_3333");
}

if(argv["customfield_xxxx"] == "XYZ") {
    lfHide("customfield_4444");
    lfHide("customfield_5555");
    lfHide("customfield_6666");
} else {
    lfShow("customfield_4444");
    lfShow("customfield_5555");
    lfShow("customfield_6666");
} 

Important Information

  • Other custom fields can be added inside the logic statements as needed

  • Multiple “trigger” fields can be used to create the conditions that show or hide other custom fields

  • This script does not hide any custom fields by default. However, this can easily be added by copying the lfShow() routines and pasting them at the top of the script.

...