CMDBuild Forum

Dependant dynamic attribute list

Hello,

Do you know if it is possible to set up dynamic choice list in CMDBuild ?

For example:

 I have the following two classes : Company  & City (N:N relation between them).

I have a third class where I would like to be able to select 1 and only 1 Country in a list  (up to now, no problem, it is easy).

Now, I would like to have a second list which lists the cities based on the Country I have selected previously.. (That's what I am not able to implement).

Do you know it it is possible to implement this ?

Thanks and regards.

Arnaud

 

 

 

Yes, it is possible.

You have to configure in your class two reference attributes (and therefore two domains, in your example with Country and City) and specify a CQL filter in the definition of the second reference attribute (City) that implements the filter you need (only the cities located in the selected country).

CMDBuild Team

 

 

 

 

Hi,

 

if i get it right, you can use filter possbility when you make reference. When you make new attribute type reference you see field named Filter and you type there a condition. Like "from Room where Id in (/(select "Id" from "Room" where "Building"::varchar='{client:Building}'  and "Status"='A')/)"  without quotes. But you change room to city and buidling to Country.

 

Hope it was helpful :)

Hi Juraj, 
 
That's exactly what I was looking for ! 
 
Thank you very much.
 
Arnaud
 
Previously Juraj wrote:

Hi,

 

if i get it right, you can use filter possbility when you make reference. When you make new attribute type reference you see field named Filter and you type there a condition. Like "from Room where Id in (/(select "Id" from "Room" where "Building"::varchar='{client:Building}'  and "Status"='A')/)"  without quotes. But you change room to city and buidling to Country.

 

Hope it was helpful :)

Hello CMDBuild Team !
 
Thanks for your answer, I managed to do it.
 
Grazie Mille e continuate il vostro ottimo  lavoro!  L'applicazione è stupenda :)
 
Arnaud
 
Previously Tecnoteca wrote:

Yes, it is possible.

You have to configure in your class two reference attributes (and therefore two domains, in your example with Country and City) and specify a CQL filter in the definition of the second reference attribute (City) that implements the filter you need (only the cities located in the selected country).

CMDBuild Team