Written by

System Analyst at Bplus Tecnologia
Question Rodolfo Pscheidt Jr · Nov 6

How to use underscores in an expression in Analytics Architect.

Hi community
I have a persistent data class where there are some properties that contain underscores in their names, for example:
Property "client_name" As %String(MAXLEN = 250) [ SqlFieldName = client_name ];
In Architect, I would like to use this property in an expression, in this field:

But I can't figure it out. If I use %source.client_name, it gives a compilation error. If I use %source."client_name", it treats it as the string "client_name" instead of getting the value from the field. Any suggestions on how to do this?

Product version: IRIS 2025.2
$ZV: IRIS for Windows (x86-64) 2025.2 (Build 227U) Thu Jul 10 2025 11:01:07 EDT

Comments

In ObjectScript "_" is concatenation operator variable _ variable or for defining a name for data class MyPackage_User.Names. In you case the system tries to concatenate two fields. In case when you wrap it in double quotes it realy just became a string, that how syntax works for %source in Architect, you can not workaround it, i suggest you to just rename it without any delimiter if possible.
If you use any other data classes exclusively for SQL tables, delimited field will work just fine with double quotes.

0
Rodolfo Pscheidt Jr  Nov 10 to Enrico Parisi

It didn't work. It shows an UNDEFINED error in the %source variable. It's strange, we imagine that %source is an object that stores the fields, but it isn't; we can't access the %source variable directly.

0
Evgeny Shvarov  Nov 11 to Rodolfo Pscheidt Jr

you can go for:

$property(%source.%PackageName()_"."_%source.%ClassName(),"client_name")
0
Evgeny Shvarov  Nov 11 to Rodolfo Pscheidt Jr

Or just add a method in a cube class that does what you want and call it via:

%cube.YourMethod(%source.%Id())

0