CMS Development

AKoprivec
Participant

How to change contact property with HubL

I'm trying to get HubL to change a contact property based on the calculated result the module creates. Heres the code:

 

{% set contact.konfigurator_marketing = number|round(1) %}

 

but the contact property doesn't chage and stays at the same default value.

 

0 Upvotes
3 Replies 3
alyssamwilie
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to change contact property with HubL

@AKoprivec You can't completely change a contact property with HubL as if it's a common variable since it will always pulls directly from a database. What exactly is your use case here for changing the property? If you're wanting to change the property within the portal itself that would need to be done through a HubSpot form, the API, or a workflow.

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
AKoprivec
Participant

How to change contact property with HubL

The code does some math based on the contacts properties gathered by the forms he fills out, and the end result is a number that represents the grade. I want to be able to somehow store that number to be able to use it on diffrent modules.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

How to change contact property with HubL

Hi, @AKoprivec 👋 Thanks for the question. Let's see if we can get the conversation started. Hey, @Jnix284 @Oezcan @Mark_Ryba do you have any feedback for @AKoprivec?

 

Thanks for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes