Suliman1

What's wrong with syntax?

Discussion created by Suliman1 on Aug 22, 2013
Latest reply on Aug 25, 2013 by Dan_Patterson
I am trying to write simple Python script, that calculate field value.
I need to check:
1. If filed exist add new filed
2. add to new filed modified value from another field

here is script for step 2:

if preview == "":
    !preview!=!cDataFileN!.replace(".img","_preview.jpg")
    !preview!.replace("\"", "")
else:
    return 0


when I try to put it in filed calculate and run it I am getting error. What's wrong with it's syntax?

Outcomes