I have a field contains owners name
Doe, John and Jane
I am trying to remove everything so just the last name showsDoe
I have tried several codes but nothing is working so far. I have Desktop 10.4
Could anyone give me some help please?
python parser in the field calculator, no need for a codeblock if it is a text field
!YourFieldName!<SPAN class="punctuation token">.</SPAN>split<SPAN class="punctuation token">(</SPAN><SPAN class="string token">","</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Thank you! I really appreciated the help.
Thank you! It worked
Guessing you are using the field calculator, add a little Pre-Logic code:
def justname(txt): return txt[0: txt.find(',')]
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.