I’m trying to work with a multivalue selectbox property on a contact.
When printing the value {{ contact[<property>] }} it renders a comma separated string of values. However trying to split this string doesn’t work, it remains the unchanged comma separated string no matter what kind of transformation I try to apply.
It would be ideal if I could access the internal values in some format, but given that is probably not possible in hubl, I was hoping to be able to split the values at least.
When I apply the pprint filter, it tells me that the variable is a VarPassThroughReplacer. This did not result in any google search results. From the name it might mean that it will not be modifyable by any filter. Is that a correct conclusion?
Hi, Pieter (@PDeT) Thanks for adding your question. Are you able to share any additional details for the community? Code blocks, screenshots, errors, etc? This helps the community to better understand your issue.
So you see the contact property is being rendered as could be expected as a comma separated list of values. However, I cannot split that value on the comma. I think this is due to the (undocumented) type of variable “VarPassThroughReplacer”, this could be a type that is immune to the (some) filters like split. Can this be confirmed? Are there other ways I could split the values?
@PDeT- After many tries, I guess that there’s problem with the rendering process of HubL which makes the embeded property like contact being rendered after the other statement (If statement in my case).
{{contact.email}} will show the value of the contact.email, but the If statement on this contact.email won’t work normarlly.
However, it’s difficult to make further investigation without HubL codebase
Hi @Jaycee_Lewis , it seems it is even impossible to compare values for these properties, neither comparison with their internal value or visual value returns anything meaningful.
There must be some HS developer that can explain what this type of variable is?
another infuriating code example:
{% if contact[‘email_sub_type_optin_confirmation_email’] == “Yes” %}