Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Is there a better way to color a row in a dynamic table without knowing the column names?

Avatar

Level 3
Hi,<br /><br />I am able to get the number of rows in a dynamic table after data are merged. Now, I am able to loop through rows to find description that matches "Demand" string, but how do I loop thru that row to fillColor the entire row? I am doing it with the following currently, but is there a better way to color the entire row without knowing the column names? Thanks.<br /><br />var rowCount = Row1.instanceManager.count;<br />for (i=0; i<rowCount; i++) {<br /> var str = xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].Description").rawValue;<br /> if (str.indexOf("Demand") > -1) {<br /> xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].Description").fillColor = "224, 224, 224";<br /> xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].DayMinus2").fillColor = "224, 224, 224";<br /> xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].DayMinus1").fillColor = "224, 224, 224";<br /> xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].CurrentDay").fillColor = "224, 224, 224";<br /> xfa.resolveNode("NewDataSet.Page1.Table2.Row1[" + i + "].DailyChange").fillColor = "224, 224, 224";<br /> } <br />}
2 Replies

Avatar

Former Community Member
The Row1 object itself should have a fillColor. then everything inside it will adopt that color.

Avatar

Level 3
Great, that worked, thank you...