# Custom code / Format Data - split full name property

**URL:** <https://community.hubspot.com/t/custom-code-format-data-split-full-name-property/72665>\
**Category:** Data Hub\
**Tags:** workflow-extension, format-data-actions\
**Created:** [January 11, 2023, 2:05pm UTC](https://community.hubspot.com/t/custom-code-format-data-split-full-name-property/72665 "2023-01-11T14:05:03Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ShlomiGani](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@ShlomiGani](https://community.hubspot.com/u/ShlomiGani)\
**Post date:** [January 12, 2023, 12:44pm UTC](https://community.hubspot.com/t/custom-code-format-data-split-full-name-property/72665/7 "2023-01-12T12:44:04Z")

</div>

@ChrisoKlepke  
There are some names that have more than one word, so I changed the code so the first name will be the first word, but the last name will be the rest

`last_name = full_name.replace(first_name, "")`

---

_[View the full topic](https://community.hubspot.com/t/custom-code-format-data-split-full-name-property/72665)._
