I want to change the field alias in a feature class in a file gdb (and eventually in SDE). The alterfield_management syntax indicates I can do this, however, I get a syntax error when I try.
AlterField_management(fc, 'Sign_repai',, 'Sign Repair')
It seems to not like the fact that I skipped the 3rd parameter.
All of the parameters except for the first two are supposed to optional.
AlterField_management <SPAN class="punctuation token">(</SPAN>in_table<SPAN class="punctuation token">,</SPAN> field<SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>new_field_name<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>new_field_alias<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>field_type<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>field_length<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>field_is_nullable<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>clear_field_alias<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN>
If I use the existing name as the "new field name" and then set a new alias name it works.
Is the documentation incorrect? Or should I be doing something else?