Hi Pedro,

You can retrieve this information querying the class %Dictionary.PropertyDefinition.

An example:

SELECT Name
FROM %Dictionary.PropertyDefinition
WHERE parent = "mypackage.MyClassName"

The field parent is fully qualified name of the class that you want to list properties name. 

HI @Freddy Baier 

You can change your query, given alias to the columns:

SELECT id,room,client->name as ClientName,functionary->name as FunctionaryName FROM rooms ORDER BY id

Then in COS you access the columns by name:

Write rs.%Get("ClientName")
Write rs.%Get("FunctionaryName")

Hi @Mark Sharman

In the Iris, the global where localized labels reside is ^IRIS.Msg("EnsColumns"):

This global is mapped from ENSLIB database that is read only, You can't set value to this Global. 

Uncheck the Mount Read-Only option, save then you can set the value of global:

I recommend that after you finish the configuration, comeback ENSLIB database to read only.