ERROR 000306 Field not of type TEXT

169
2
07-24-2021 12:35 PM
SheydaDana
New Contributor

Hello dears

I add a text field in modelbuilder then when I want use calculate geometry for get coordinate x or y in DMS format my model not running and show this Error

but in number format run without error

ERROR 000306 Field LatDMS not of type TEXT

pleas help me

thanks

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

you need to "str" the value to put it into a text field


... sort of retired...
JayantaPoddar
MVP Esteemed Contributor

This worked perfectly fine for me.

By the way, X is Lon, and Y is Lat.

JayantaPoddar_0-1627185732483.png

 

Remove "LatDMS" field from the attribute table, if it already exists. Could you recreate the model from scratch, and test again? Restart ArcGIS Pro, if required. Let me know if the issue persists.

A Note: Unless you recreate a feature class every time in a model, "Add Field" is a one-time process. Are you sure you want to have "Add Data" tool as a part of the model, especially if you want to run the model again to calculate the geometry (if new records are added)?



Think Location
0 Kudos