AnsweredAssumed Answered

Calculate Field Syntax Error in ModelBuilder, what am I doing wrong?

Question asked by Laedryn on Apr 13, 2017
Latest reply on Apr 18, 2017 by Laedryn

Hi everyone,


Very new to ModelBuilder - I am trying to use ModelBuilder to add a field called “Survey_ID” then populate that field using Calculate Field to use the last 6 characters of the filename for a group of feature classes. The Iterate Feature Classes and Add Field options seem to be working, but my Calculate Field expression seems to be incorrect. Here is the error I get when I run the model:

Executing (Calculate Field): CalculateField "O:\DCF\Test HerringAS Geodatabase.gdb\HAS_Photo_0325_201702" Survey_ID Right('HAS_Photo_0325_201702', 6) VB #

Start Time: Thu Apr 13 09:16:24 2017

General error executing calculator.

ERROR 999999: Error executing function.

Syntax error

Failed to execute (Calculate Field).


For the Calculate Field I hit the Calculator icon, and in the box for Survey_ID = I use this expression: Right('%Name%', 6)


Any idea what I’m doing wrong here?


Thanks so much for any assistance!