I'm trying to populate a field (AVO) using this statement

dim avo
if [join] = 1 then AVO = "YES"

It works if I do it in ArcMap but it doesn't when I use the same syntax in ModelBuilder.

  • It may help diagnose your problem if you clarify what version of ArcGIS Desktop you are using, and if known, what relevant service packs/patches you have installed (ex: V10.1 with x64 Background Geoprocessing Service Pack).
    – John
    Jan 14, 2015 at 23:24
  • i have 10.2.2 version with a 64bit machine
    – HMAN
    Jan 14, 2015 at 23:29
  • Can you show the exact syntax of the field calculation please. Are you sure you've got the right parser? Jan 14, 2015 at 23:31
  • parser is VB Script
    – HMAN
    Jan 14, 2015 at 23:39
  • 1
    I think screenshots of your Calculate Field syntax, and of a test model that uses it, edited into your question would help resolve this one. See How to ask a good question? for tips on how you can help us to help you.
    – PolyGeo
    Jan 15, 2015 at 0:03

1 Answer 1


I don't know exactly how you are typing in your code, but my first assumption is if it works in one spot but not the other to check that the parser (VB vs Python) is set correctly and the same way in both places. Second, of course I don't know what specifically your workflow looks like in either spot, but it might be worth double checking in modelbuilder that the exact same dataset and schema is actually being used EX: If there is a step in the model before it that deletes a field or if there is an actual join performed at some point, that could change if the code is valid (if there is a join performed in the model, the field names may need to be stated differently, possibly including the source table name for each field for example).

These may or may not be your specific issue, but there's a couple of thoughts to hopefully get you going.

  • it's just simple spatial join, no fields being deleted. first what i did was use the calculate field tool in model builder and wrote my code, when it didn't work i opened up the shapefile in acrmap, right click the field i wanted to popullate select field calculater and paste the same code and it worked then. i ran into a statement saying calculate field in model builder is not supported in 64 bit, is this why it's not working?
    – HMAN
    Jan 14, 2015 at 23:18
  • 2
    Calculate field is supported on 64 bit but VBscript parser is not. You need to use PYTHON or PYTHON9.3 parser (and adjust your code accordingly). Also are you using fully qualified field names help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… Jan 14, 2015 at 23:33
  • 2
    @HMAN Try running your model in the foreground (always 32bit at 10.2) and if it runs there, then you will know that the 64bit background geoprocessing lacking VBscript is the cause. I would recommend switching to the Python parser for this and many other reasons. Python will have a similar but different syntax of course.
    – PolyGeo
    Jan 15, 2015 at 0:08

Your Answer

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

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