Jump to content

Recommended Posts

Posted

Hi

 

I am looking for a way to color a cell in a table. I see plently of sample scripts to color rows based on conditions, In this case, I need to be able color a single cell where the designated column and row intersect, or apply a color to the entire column. Being able to color a cell is one way to iterate ove all rows and apply the color to the column.

 

Please let me know if you have a tip or example I can use.

 

Thanks

Posted

Hi Ray

 

Thanks a lot. My case is a bit different, but your feedback gave me the hint I needed. What you have listed as Rows (a,b,c ... ) are in my case Columns (fields). The trick was, as per your suggestion, to create a calculated field and utilizing the property text box and apply a rule for each column. So now, I have columns colors that goes on/off as I traverse the property list box.

 

works like a charm

 

Thanks a lot.

  • 2 years later...
Posted

Good morning Jscriptor,

 

You can color a cell or multiple cells by using the Table Properties: Colors dialogue to create a 'Rule'. I've attached a small example of how you can implement a rule based on a condition:

 

Condition: If the selected item in the listbox matches the 'Headers' column, I want the matching cell in the table to be red.

 

 

I inserted a calculated column named 'Selected' which displays a concatentated string of each selected item in the list box.

I inserted a calculated column named 'Find Selected' which searches for the 'Header' in the concatenated string

I added a rule to the 'Headers' column using the Table Properties: Colors dialogue

 

 

Please refer the attached screenshot: [colorbyCondtion.gif]

 

Please refer the attached screenshot: [colorbyCondtion2gif.gif]

 

The calculated columns are just 'helpers' -- you could further simplify the custom expression in the following manner:

Please refer the attached screenshot: [colorbyCondtion3gif.gif]

 

Hope this helps,

 

Ray

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...