AnsweredAssumed Answered

Optional parameters Modelbuilder bloc code

Question asked by Jonathan1311 on Nov 30, 2017


I have created a model to automate a task but having difficulty with my optional parameter (variable substitution) with bloc code of my field calculator tool. I want to calculate the field Restrictio only if the user type something in the text box otherwise just pass (keep the current value in the field). Here my model:

The python script:

def UpdateField(value = "%ModRestric%"):
   if value !="":
      return value


Thanks for your help