Highlighted

Display numerical field based on specific value, otherwise hidden

Explorer ,
Sep 24, 2020

Copy link to clipboard

Copied

Hi,

 

Am  attempting to get a field (H_ARM) to be "hidden" if a specific value (22.86615) is displayed, and if any other value at all is present, then the field should be "visible".....any ideas?

Use this code as custom validation script:

event.target.display = event.value == 22.86615 ? display.hidden : display.visible;

TOPICS
PDF forms

Views

74

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Display numerical field based on specific value, otherwise hidden

Explorer ,
Sep 24, 2020

Copy link to clipboard

Copied

Hi,

 

Am  attempting to get a field (H_ARM) to be "hidden" if a specific value (22.86615) is displayed, and if any other value at all is present, then the field should be "visible".....any ideas?

Use this code as custom validation script:

event.target.display = event.value == 22.86615 ? display.hidden : display.visible;

TOPICS
PDF forms

Views

75

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 24, 2020 0
Contributor ,
Sep 24, 2020

Copy link to clipboard

Copied

How do you insert values into that  field?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 0
Explorer ,
Sep 24, 2020

Copy link to clipboard

Copied

The field is automatically populated from another field called "ZFW_CG_ACTUAL",  and the figure is calculated in that field to 5d.p. - whereas the "H_ARM" field is set to 2d.p. - i've tried both iterations and variations (on d.p.'s) but without success ;-(

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 0
Engaged ,
Sep 24, 2020

Copy link to clipboard

Copied

Use this code as custom validation script:

event.target.display = event.value == 22.86615 ? display.hidden : display.visible;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 1
Explorer ,
Sep 24, 2020

Copy link to clipboard

Copied

Hi Nesa,

 

Many thanks for your earlier reply - question if you don't mind? the script works fine, but when using on an iPad the value is intially hidden as desired but when using a drop-down field to populate the the "H_ARM" field, and then selecting a NIL value drop-down option, the "22.86615" value remains.....works as desired on a PC, but not iPad (using Fluix) - any ideas? 😉  

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 0
Asim123 LATEST
Contributor ,
Sep 24, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 24, 2020 0