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

[DUPLICATE, LOCKED] Making rows hidden or visible based on dropdown entry in another field.

Community Beginner ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

I am wondering how to make a field hidden unless a user selects "Deficient" in which case 

the field then becomes visible populated as "Deficient".

 

the code I have currently which is not working:

 

var deficientB1 = true;
if(this.getField("AnalysisB1").valueAsString = "Deficient") deficientB1 == false;

if (deficientB1 = true)
this.getField("Element_Row_1").display = display.hidden;

if (deficientB1 == false)

this.getField("Element_Row_1").display = display.visible;

 

I also have this code which is designed to only populate a field if "Deficient" is selected but is instead populating the field no matter what option the user selects from a dropdown:

var AnalysisB1 = this.getField("AnalysisB1").valueAsString;
if(AnalysisB1 = "Deficient")
event.value = this.getField("AnalysisB1").valueAsString;
else if (AnalysisB1 = "Repeat Deficient")
event.value = null;
else if (AnalysisB1 = "In Compliance")
event.value = null;
else if (AnalysisB1 = "Remark")
event.value = null;
else if (AnalysisB1 = "Not Applicable")
event.value = null;
else if (AnalysisB1 = "Not Evaluated")
event.value = null;

Views

90

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 ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

[Moderator moved from Using the Community (forums) to Coding Corner.]

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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 ,
Jun 24, 2021 Jun 24, 2021

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