# 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:** 9

<div class="post-metadata">

**Author:** ![LRiley32](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@LRiley32](https://community.hubspot.com/u/LRiley32)\
**Post date:** [May 17, 2023, 7:08pm UTC](https://community.hubspot.com/t/custom-code-format-data-split-full-name-property/72665/9 "2023-05-17T19:08:46Z")

</div>

@ChrisoKlepke

when implementing the code and “first name” contains only one name, it duplicates the first name to the last name.

Is there a way to prevent the code from running if there is no space and last name?

---

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