# Custom field - with calculation

**URL:** <https://community.hubspot.com/t/custom-field-with-calculation/90684>\
**Category:** CRM\
**Tags:** crm, professional\
**Created:** [September 28, 2023, 1:19pm UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684 "2023-09-28T13:19:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexisData](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@AlexisData](https://community.hubspot.com/u/AlexisData)\
**Post date:** [September 28, 2023, 1:19pm UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684/1 "2023-09-28T13:19:28Z")

</div>

How do you create a field in Hubspot whose value is equal to the concatenation of several values specific to the customer file (for example, year created + month created + incremented number) ?

I would like this field to be automatically created when a new contact is created.

---

<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:** [September 28, 2023, 1:22pm UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684/2 "2023-09-28T13:22:32Z")

</div>

Hi @AlexisData,

This type of automation is not set up within a property but would require a workflow as well.

First, you’d create a single-line text property. Then you’d create a workflow that enrolls records when the building blocks for your concatenation are known (e.g. “Year created is known AND Month created is known AND” etc). You can then use the “Set property value” action for your newly created single-line text field.

Within the “Set property value” action you can use personalization tokens for your building blocks and add them, arrange them as you like, see this example:

 ![karstenkoehler_0-1695907342845.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/1/a1f582e090ced77075a94c7a8fdc9c6170ced8ec.png)

Best regards!

---

<div class="post-metadata">

**Author:** ![AlexisData](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@AlexisData](https://community.hubspot.com/u/AlexisData)\
**Post date:** [September 28, 2023, 1:34pm UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684/3 "2023-09-28T13:34:44Z")

</div>

Thanks for you answer. What about incrementation ?

---

<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:** [September 28, 2023, 1:38pm UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684/4 "2023-09-28T13:38:59Z")

</div>

@AlexisData what exactly do you want to increase?

---

<div class="post-metadata">

**Author:** ![AlexisData](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@AlexisData](https://community.hubspot.com/u/AlexisData)\
**Post date:** [September 29, 2023, 8:36am UTC](https://community.hubspot.com/t/custom-field-with-calculation/90684/5 "2023-09-29T08:36:40Z")

</div>

Let’s say that I want to create a custom field with the value “year” + number to increase, so 2023001, 2023002, 2023003 etc.
