Pulling data into hidden rows based on a selected value with Javascript
- May 20, 2021
- 1 reply
- 4317 views
My question concerns pulling data into the bottom index based on whether a the score is "Deficient" or not.
if the Score is "Deficient" I want to pull the value from the "Analysis" field, the "Elem" field , and the "Date_af_date" into the corresponding fields in the bottom index. I realize the "Date_af_date" column will need a rename.
Also, I only want as many bottom index rows to appear as there are deficiencies, otherwise I want the rows to be hidden. I wrote some template code for A to for pulling the values but I dont know how to work with hidden rows at all.
var da = 0
for var (i = 1, i <= 18, i++){
if (this.getField("AnalysesA"+i).valueAsString == "Deficient");
{
this.getField("Element_Row_"+i).valueAsString = this.getField("ElemA"+i).valueAsString;
this.getField("RankA"+i) = this.getField("A, B, C Ranking_Row_"+i);
this.getField("Date_af_DateA"+i).valueAsDate = this.getField("Correct By(Date)_Row"+i)
}}
if (this.getField("AnalysesA"+i).valueAsString != "Deficient";
{
//rows stay hidden code
}
