# Compare two fields

**URL:** <https://community.hubspot.com/t/compare-two-fields/121760>\
**Category:** CRM\
**Tags:** workflows, crm, object\
**Created:** [December 3, 2024, 1:43am UTC](https://community.hubspot.com/t/compare-two-fields/121760 "2024-12-03T01:43:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TGibs02](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@TGibs02](https://community.hubspot.com/u/TGibs02)\
**Post date:** [December 3, 2024, 1:43am UTC](https://community.hubspot.com/t/compare-two-fields/121760/1 "2024-12-03T01:43:51Z")

</div>

Hi,

I am wanting to compare two properties on the same object to set another property on the same object.

The three properties are on the Deal object:

1. Deal owner

2. Company owner

3. Is a match

This is the scenario:

Deal owner = James Dunn

Company owner = James Dunn

Is a match = Yes

Deal owner = James Dunn

Company owner = Mary Smith

Is a match = No

I am hoping there is a WF action that can look at the two owner properties and set the is a match property.

Any help would be appreciated.

Thanks,

Tanya

---

<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:** [December 3, 2024, 5:03am UTC](https://community.hubspot.com/t/compare-two-fields/121760/2 "2024-12-03T05:03:50Z")

</div>

Hi @TGibs02,

While this is possible with a custom code action and Javascript/Python in a workflow (requiring Operations Hub Professional or Enterprise), I find it easier to create a sync and a calculation property:

> **[Create sync properties that copy data to associated records](https://knowledge.hubspot.com/properties/create-sync-properties)**
>
> Learn how to create sync properties that can copy property data from a record to its associated records.

> **[Create calculation and rollup properties](https://knowledge.hubspot.com/properties/create-calculation-properties)**
>
> Learn how you can create calculation, time since, time between, time until, or rollup properties in HubSpot based on property values.

- The sync property would be created on the deal object and pull the company owner.
- The calculation property would compare with an easy if statement.

 ![karstenkoehler_0-1733202155179.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/f/0f4156b8ff75bd326657ff19b6d51e281d2abdd3.png)

 ![karstenkoehler_1-1733202213388.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/5/551e33cd9f062663ff0742d35ead68312894a401.png)

Let me know if you have any follow-up questions!

---

<div class="post-metadata">

**Author:** ![TGibs02](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@TGibs02](https://community.hubspot.com/u/TGibs02)\
**Post date:** [December 3, 2024, 6:58am UTC](https://community.hubspot.com/t/compare-two-fields/121760/3 "2024-12-03T06:58:32Z")

</div>

Legend! Thank you. Works perfectly.
