Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

ArcGIS 10.2

I am looking for an IF/ELSE statement that I can place in the text properties of my Data Driven Page Attribute item to change the font color based on the value in that field. Here is the function I have been trying. Its a variation on a function for basic map label. I can't get this function to work w/ dynamic text.

Function FindLabel<dyn type="page" property="attribute" field="RP_Slope" domainlookup="true"/> > 2 then FindLabel = <CLR red='255'><dyn type="page" property="attribute" field="RP_Slope" domainlookup="true"/></CLR> else FindLabel = <dyn type="page" property="attribute" field="RP_Slope" domainlookup="true"/> end if End Function

share|improve this question
<dyn type="page" property="RP_Slope"/> is the code for the dynamic name pointing at the slope field. I need to add to this code so when the value is outside the allowed limit the value will appear in red. – Wren Sep 9 '13 at 18:59
I'm not sure how much clearer I can make my question. Can you please remove the hold? – Wren Sep 12 '13 at 14:08

In the Answer to the Question How to do Math within ArcMap Dynamic Text? I folund.

This from Jeffrey Barrette, an ESRI employee:

"No. Dynamic Text provides many different formatting options for dates, times, coord systems, etc but it does not provide the logic to perform mathematical operations. You would need to incorporate Python and then use arcpy.mapping to update text elements in a layout."

In the same way the if/then logic that you are seeking to use within a Dynamic Text element to determine font colour simply does not exist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.