Conditional formatting for cells in a layout table frame

1911
6
08-22-2019 07:41 AM
Zeke
by
Regular Contributor III

Is there a way to conditionally format a cell in a table frame, either manually or by setting some condition? I can format an column, but I'd like to set text properties and ideally background color for cells where the value exceeds a certain number. I tried formatting the data in excel and used that as the data source for the frame, but the format settings didn't import with it.

Thanks!

6 Replies
TomBole
Esri Regular Contributor

HI Greg, 

Currently, you cannot individually format cells within a Table Frame. In order to do something like this you would either need to construct the table by using graphics (for the borders, etc...), text elements for the labels, and Table Dynamic Text elements for the values. You could then format each text element as you see fit. Use the rectangle text element for the text. This way you can set a background if you want.

It's labor intensive, but you should be able to get the customization you're looking for.

For more info on dynamic text see - What is dynamic text?—Layouts | ArcGIS Desktop 

Hope this helps,

Tom

Zeke
by
Regular Contributor III

Thanks Tom. I was afraid of that. Although there are only a few values I want highlighted, there are enough other values that the method you suggest wouldn't be practical.

Oh well, over to the ideas page.

0 Kudos
TomBole
Esri Regular Contributor

If it is only a few values, you could overlay a rectangle text element on top of the cell you want to highlight.  Make the rectangle extent the same size as the cell and symbolize the text as needed.

For example, here is a table frame of some US state capitals with population values.

Let's say I want to highlight values over 100,000 with bold red text.

1. Create a rectangle text element with the value I want to highlight. In my case I want to set a red color fill for the text symbol and to make it the same size as the text of the value in the table frame.

2. Position the text in the rectangle to match the position of the values in the table frame.

Note: Vertical alignment does not currently work for layout rectangle text elements.

3. Give the text element a white background (to match the background in the table frame and also to cover any table frame text I don't want to show).

4. Place the text element over the desired text in the table frame.

5. Resize the text element as necessary to fit the cell. To make very fine adjustments - zoom in real close. You may also need to adjust the Y offset of the text to get better vertical alignment. 

6. Once you have a rectangle text element properly sized you can copy this element, enter a new value (change the text symbol if needed) and overlay this new element where needed.

7. Once you have your table the way you like I would recommend group the table frame with the text element you create. That way, if you want to move your table you can move everything at once. 

Note: This will not work if you want to resize your table. This work-around will also not work if the table is dynamic (e.g. row change based what is visible in the map).

Hope this helps, 

Tom

Zeke
by
Regular Contributor III

Thanks Tom. What I ended up doing is formatting the table in Excel and then inserting it as a picture. Not ideal, but works for now.

0 Kudos
KariBuckvold
Occasional Contributor

I came here to find out if this was a possibility, you could do with Production Mapping on desktop.  I used to make each row a different background based on attributes.  Did you create an idea?  I'll go vote for it!

0 Kudos
KariBuckvold
Occasional Contributor
0 Kudos