How do you use UDF's in a variable?

I am grabbing the customer Account into global.Account

I then want to use it in a {{global.account.xxxx}} ref, but cant work out the syntax to use a UDF. Please can someone advise.


One way to get the syntax is to change the variable to a local variable (i.e. custom.account), and then use the auto-complete to find the UDF (i.e. type {{Subscription or {{UDF and see what is displayed).

If that’s a string UDF, it will be accessed like this:

{{custom.account.[UDF:Azure Subscription ID 1]}}

For UDFs that are picklists, you obtain the value using either of these:

{{custom.account.[UDF:Azure Subscription ID 1].Value}}
{{custom.account.[UDF:Azure Subscription ID 1]}}

Picklist UDFs also have other properties available:

{{custom.account.[UDF:Azure Subscription ID 1].IsDefaultValue}}
{{custom.account.[UDF:Azure Subscription ID 1].IsSystem}}
{{custom.account.[UDF:Azure Subscription ID 1].Label}}
{{custom.account.[UDF:Azure Subscription ID 1].SortOrder}}

Thanks Travis. Ive tried to get this working to no avail. Essentially I have a value that I want to look up in the UDF. Then if that value exists add it to the existing line

Errors with the following. Any ideas?

Hey @dale ,

My apologies. Text expressions (inside {{ ... }}) and logical expressions (inside the “Expression Builder”) use different technology and slightly different syntax.

Try this (no period before the [ bracket, and quotes around the UDF name):

global.Account["UDF:Reservation Order ID"]

Also, your expression doesn’t look quite right to me. I think there is a verb missing here (maybe “matches”?):

Thanks. Yes I was missing matches

Think im almost there. I did make a mistake and missed out Matches. Is the expression correct now?

I think its not working correctly as its not finding the value in the UDF as they do match.

Does it work if you use this?

global.Account["UDF:Reservation Order ID"].Value

Unfortunately its still skipping the rule.

I can see globalReservationID is present to matches
Account exists so thats ok.
My guess is that its failing to find the reservation ID in the UDF.

UDF value shown:



Thanks for the new screenshot.

The expression builder doesn’t support any text replacement (you can’t use {{variable}} expressions in the expression builder). Instead, the expression builder has direct access to the variable.

The expression can use the contains or == operators instead of the matches operator, which won’t need to receive a valid regular expression. Try this for the second part of your expression:

global.Account["UDF:Reservation Order ID"].Value contains global.ReservationID


global.Account["UDF:Reservation Order ID"].Value == global.ReservationID