CMDBuild Forum

Data shown in the domain references in the attributes

How can I see and configure which fields of the classes are shown in the attribute with a reference to a domain?

example, I have two classes

class 1 “clients”
attribute 1 “name” str
attribute 2 “lastname” str

class 2 “sale”
attribute 1 “product” str
attribute 2 “customer” reference with domain “customers-sales”

in the customer-sales domain is an n:n source “customers” destination “sales”

The problem is that if I don’t use the default attributes that it creates (“code” “description”) attribute 2 of the “sales” class shows nothing, if I use the default ones it only shows the description

in other domains already created by ready2use some domains bring for example “code”-“model”[“hostname”]

How can this be configured to change the default attributes and put more than one attribute?

thanks for any information

You cant change the default attribute, it will always be the description. But anyway, you can autogenerate the description based on mutiple other fields by setting the auto value in the description field to for example the following script:

api.setValue(api.getReferenceCode(“customer”)+" - "+api.getValue(“product”));

and in the view rule you can type:

return “disabled”;

to show the attribute, but dont allow any change on it

1 Like