csikora

Using If Statements in Field Calculator

Discussion created by csikora on Jul 1, 2011
Latest reply on Jul 1, 2011 by dhoneycutt-esristaff
Hello,

I am trying to use Field Calculator to collect values from multiple fields in a feature class.  I only want records with no value to be filled in with the Field Calculator result.  Since I am setting this up for automatic updates, I am trying to program this within Model Builder.  However, my relative lack of programming experience is holding me back. Right now, my attept to program this goes as follows:

(Using Python as the Parse)
Pre-Logic Script Code:
If !STR_ADD! = " " Then

STR_ADD=
!STR_NUM! +" " + !STR_PRE_DIR! +" " + !STR_PRE_TYPE! +" " + !STR_NAM!

Essentially, if my STR_ADD field is empty, I want to fill it with the combined values of the other four fields mentioned.  I want to continue with the code to add values from other fields when some of my records remain empty.  However, if I can't get this first part completed, it is hard to continue.

Thank you for your help in advance!

Colter

Outcomes