# Truncate a Property Using a Calculation Property

**URL:** <https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045>\
**Category:** Tips, Tricks & Best Practices\
**Tags:** professional\
**Created:** [January 30, 2024, 9:31pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045 "2024-01-30T21:31:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![LWest0](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@LWest0](https://community.hubspot.com/u/LWest0)\
**Post date:** [January 30, 2024, 9:31pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/1 "2024-01-30T21:31:43Z")

</div>

Hello,

I’d like to create a new property on the Deal object that takes the Record ID and truncates it to 5 values. Is this possible? I’ve tried to do calc like LEFT(Record ID, -5), etc. but I haven’t been able to land on anything. Any known sollution?

Thanks!

LW

---

<div class="post-metadata">

**Author:** ![trevordjones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trevordjones/32/35637_2.png) [@trevordjones](https://community.hubspot.com/u/trevordjones)\
**Post date:** [January 30, 2024, 10:15pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/2 "2024-01-30T22:15:19Z")

</div>

Hi @LWest0 The only idea I can offer you is to use a custom coded workflow action to grab those last five digits and copy them into another property. However, custom coded workflow actions will require an OperationsHub Professional license.

@Jnix284 and @danmoyle , do you have any other ideas that might help, here?

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [February 1, 2024, 12:02pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/3 "2024-02-01T12:02:17Z")

</div>

@trevordjones and @LWest0, I also don’t have a workaround solution without having access to custom coded actions…unless you want to go the really really manual route.

You can export your data to Excel, create a second column for your custom property and use the **=TRUNC(number,[num\_digits])** formula to generate your new value, then import it back to HubSpot.

As @danmoyle mentioned, if you can share your use case or more details, we can likely come up with a solution that could solve for the need in a different way.

---

<div class="post-metadata">

**Author:** ![LWest0](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@LWest0](https://community.hubspot.com/u/LWest0)\
**Post date:** [January 30, 2024, 11:53pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/4 "2024-01-30T23:53:57Z")

</div>

Hi Trevor!

Thanks for getting back to me & exposing a solution and our limitations! We don’t currently have that license so any other suggestions would gladly be accepted.

Thank you!

LW

---

<div class="post-metadata">

**Author:** ![trevordjones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trevordjones/32/35637_2.png) [@trevordjones](https://community.hubspot.com/u/trevordjones)\
**Post date:** [January 31, 2024, 2:46am UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/5 "2024-01-31T02:46:53Z")

</div>

I wish I had more to offer! I can say that I personally know of no solutions that will do what you are asking for without custom code.  
Maybe Jennifer or Dan will have an alternative to offer.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [January 31, 2024, 5:45am UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/6 "2024-01-31T05:45:30Z")

</div>

Hi @LWest0,

I can confirm what @trevordjones shared; as far as I know this requires an Operations Hub Professional or Enterprise subscription if you want to do it natively. [Workflows | Custom Code Actions - HubSpot docs](https://developers.hubspot.com/docs/api/workflows/custom-code-actions)

You could alternatively explore third-party solutions like Zapier to see if their automation capabilities help you solve this: [Use HubSpot's integration with Zapier](https://knowledge.hubspot.com/integrations/how-to-use-zapier-and-hubspot)

Best regards

---

<div class="post-metadata">

**Author:** ![danmoyle](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danmoyle/32/91166_2.png) [@danmoyle](https://community.hubspot.com/u/danmoyle)\
**Post date:** [January 31, 2024, 7:38pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/7 "2024-01-31T19:38:26Z")

</div>

Hi @LWest0 (thanks for the tag @trevordjones). Could I ask - why change the record ID in a new property? Is there a different solution for something you’re trying to solve?

If record IDs are 11 digits like “19283620712” and you truncate it, you could have a bunch of Deals with the same 5-digit property “19283.” I’m unsure what this would do for you?

As Trevor & Karsten mentioned, there’s probably an Ops Hub custom cide you might be able to do, but if we know the why, maybe there’s something altogether different to offer?

---

<div class="post-metadata">

**Author:** ![LWest0](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@LWest0](https://community.hubspot.com/u/LWest0)\
**Post date:** [February 1, 2024, 6:09pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/8 "2024-02-01T18:09:22Z")

</div>

Thanks to you all and good point Dan! We are essentially looking for an automated unique ID # with 5 digits. You’re right that truncating Record ID wouldnt work in that regard. Didn’t see a way to set an automated unique number either. Is this possible? Thanks so much again!

---

<div class="post-metadata">

**Author:** ![trevordjones](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/trevordjones/32/35637_2.png) [@trevordjones](https://community.hubspot.com/u/trevordjones)\
**Post date:** [February 1, 2024, 6:15pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/9 "2024-02-01T18:15:47Z")

</div>

Hi @LWest0 ,

Actually [this community post](https://community.hubspot.com/t5/CRM/Generate-unique-account-customer-ID-via-workflow/td-p/709521) from @karstenkoehler explains a workaround that you could use to do this quite well.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [February 1, 2024, 6:39pm UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/10 "2024-02-01T18:39:45Z")

</div>

Nice find @trevordjones, thanks for sharing!

---

<div class="post-metadata">

**Author:** ![LWest0](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@LWest0](https://community.hubspot.com/u/LWest0)\
**Post date:** [February 2, 2024, 1:45am UTC](https://community.hubspot.com/t/truncate-a-property-using-a-calculation-property/99045/11 "2024-02-02T01:45:52Z")

</div>

Yes! Thank you so much Trevor & everyone else who helped out.
