Hi, I'm trying to set row color (not cell color) by given RGB values in my columns. However, i can not get the correct loop for assigning the custom colors that I want. Could anyone help?
Code and datatable attached. Thanks!
// Get the current data table
dt = Current Data Table();
// Initialize the color lists
RedList = Column(dt, "Red") << Get Values;
GreenList = Column(dt, "Green") << Get Values;
BlueList = Column(dt, "Blue") << Get Values;
// Ensure we do not exceed the number of rows or the number of items in any color list
minLength = Min( N Rows(dt), N Items(RedList), N Items(GreenList), N Items(BlueList) );
// Loop to set the row colors
For( i = 1, i <= minLength, i++,
// Clear any previous selections
dt << Clear Select;
// Select the current row
dt << Select Where( Row() == i );
// Set the row color
dt << Set Row Colors( RedList[i], GreenList[i], BlueList[i] );
);