XDP Form - referencing current row DDL value and setting colour of value
I have a paragraph number field in a repeating table row. I cannot seem to get the code correct, which is as follows:
form1.Page1.SubChecklist.Table.Detail.ParaNum::ready:layout - (JavaScript, client)
var vCurrentRow = this.parent.index;
if (Table.Detail[" + vCurrentRow + "].DDLAlign.rawValue == "No" || Table.Detail[" + vCurrentRow + "].DDLPrompt.rawValue == "No"){
if (xfa.host.version < 😎😎{
this.resolveNode("$").fontColor = "249, 11, 8";
}
else {
var CaptionColorBackup = this.resolveNode("$").caption.font.fill.color.value;
this.resolveNode("$").font.fill.color.value = "249, 11, 8";
this.resolveNode("$").caption.font.fill.color.value = CaptionColorBackup;
}
}
The above script is running on the field "ParaNum" as indicated. If I use a "this." reference, the color change triggers properly for the first row.
In attempting to write the appropriate code for repeating rows, I cobbled together the above code, which, does not trigger.
I know I am missing a fundamental within the code so I am asking for help here as I cannot figure out why the code is not triggering.
The check is on values further in the row which have the value of "No" and sets the paragraph number field to red.
The "< 8)" disappears in the code above for Acrobat versioning. Please disregard this in the above.
Please help.