• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Display numerical field based on specific value, otherwise hidden

Engaged ,
Sep 24, 2020 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?

TOPICS
PDF forms

Views

426

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
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 24, 2020 Sep 24, 2020

Use this code as custom validation script:

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

Votes

Translate

Translate
Enthusiast ,
Sep 24, 2020 Sep 24, 2020

Copy link to clipboard

Copied

How do you insert values into that  field?

Votes

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
community guidelines
Engaged ,
Sep 24, 2020 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 ;-(

Votes

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
community guidelines
Community Expert ,
Sep 24, 2020 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;

Votes

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
community guidelines
Engaged ,
Sep 24, 2020 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? 😉  

Votes

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
community guidelines
Enthusiast ,
Sep 24, 2020 Sep 24, 2020

Copy link to clipboard

Copied

LATEST

Votes

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
community guidelines