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

  • <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, 2013 at 18:59
  • I'm not sure how much clearer I can make my question. Can you please remove the hold?
    – Wren
    Sep 12, 2013 at 14:08

1 Answer 1


In the Answer to the Question Doing Math calculations 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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