 |
| Field calculator expression |
I will add to this as needed since sometimes the field calculator is as powerful as an update cursor in ArcMap and much faster. Here is an example of how to replace a substring in a primary field with data found in a secondary field. In the example to the right, a small function (def) was created to strip of the last entry in a text string (split) and replace it with a value in a secondary field. The primary, secondary and resultant field results are shown below. Do note that these expressions can be saved and loaded (and modified) to suit your purposes.
In this instance, the Python parser was chosen since it offers a wider range or Functions than VB Script (which has been abandoned by ESRI in any event.
So don't forget that the field calculator can be used in place of full-fledged scripts written in Python.
 |
| Table after field calculator expression |
No comments:
Post a Comment