CMDBuild Forum

Reference Attribute has no domains in drop-down list

Hi,

 

I've been using CMDBuild v 1.4 for few weeks now and I'm gradually expanding it with new Classes and Domains. All worked fine so far, until today.

I've created a new Class (say, VMPools) and defined new Domain (VMPoolsChassis, 1:N).  However when I try to add new attribute "Chassis" to VMPools class and select type as "REFERENCE" there is nothing in the Domain list.

Any ideas what went wrong? 

 

Thanks and regards,

Victor.

If you have two classes (for example A and B) and a domain 1:N between A and B (in that order) the "reference" attribute must be created in class B.

A "reference" attribute is like a foreign key.

Fabio

Thanks Fabio, that was exactly the problem. I was trying to do that in class A. 
 
Regards,
 
Victor.
Tecnoteca ha scritto:

If you have two classes (for example A and B) and a domain 1:N between A and B (in that order) the "reference" attribute must be created in class B.

 

Tecnoteca ha scritto:

If you have two classes (for example A and B) and a domain 1:N between A and B (in that order) the "reference" attribute must be created in class B.

A "reference" attribute is like a foreign key.

Fabio

Hello Fabio,

 

 

I have follwoed the steps mentioned by you, the Domain name appears now in the dropdown menu, BUT when I switch to Data Mangement module and try to populate with data this new attribute, the drop down list is empty. Is it a Bug?

 

 

Thanks,

Cristian

It may be that the class linked by the domain is empty, or all the cards in that class have the attribute "Description" empty (the drop down list shows that value).

Fabio

Tecnoteca ha scritto:

It may be that the class linked by the domain is empty, or all the cards in that class have the attribute "Description" empty (the drop down list shows that value).

Fabio

Thank you for your answer but I think that what I've reported was ideed a bug. The issue has been fixed in the last build 1.5.2

https://bitbucket.org/tecnoteca/cmdbuild/downloads/cmdbuild-1.5.2.war

 

Previously Tecnoteca wrote:

It may be that the class linked by the domain is empty, or all the cards in that class have the attribute "Description" empty (the drop down list shows that value).

Fabio

 

Hi,

 

What are the options to use anything else then "Description" as a visual identifier?  I have a class without description but with other attributes. In my case I would need to copy the other attributes into the Description field just to make it visible as a linked class. Which seems a bit clumsy.

 

Many thanks,

Koos

At this time you can not use attributes other than “Description”.
This feature will be introduced in next versions.
CMDBuild Team

Previously Tecnoteca wrote:

At this time you can not use attributes other than "Description".
This feature will be introduced in next versions.
CMDBuild Team
In reference to this message, written in May of last year (2015), are there any changes to its position on the roadmap? 
 
Thanks. :)

No I’m sorry.
At the moment we are working on the new relations graph (the basic functions will be ready later this year) and on other minor functions (related to localization, filters, authentication, widgets, etc.) that will be released in October.
CMDBuild Team

Previously Tecnoteca wrote:

No I'm sorry.
At the moment we are working on the new relations graph (the basic functions will be ready later this year) and on other minor functions (related to localization, filters, authentication, widgets, etc.) that will be released in October.
CMDBuild Team

 

 
In reference to this message, written in August of last year (2015), are there any changes to its position on the roadmap? 
 
Thanks. :)

Yes, you can find them in the CMDBuild newsletters:
http://www.cmdbuild.org/en/diffusione/newsletter
or in the CMDBuild Roadmap:
http://www.cmdbuild.org/en/progetto/roadmap
CMDBuild Team
 

HI.
 
If you can show an example of how this is done for the test stand "http://demo.cmdbuild.org". For example, "Reference" attribute Assigne for "Assets - PC".
 
How to specify a field other than "Deskription" in the linked map. In the admin manual, I could not find the answer ...
 
Thank.
 
 
Previously Tecnoteca wrote:
Yes, you can find them in the CMDBuild newsletters:
http://www.cmdbuild.org/en/diffusione/newsletter
or in the CMDBuild Roadmap:
http://www.cmdbuild.org/en/progetto/roadmap
CMDBuild Team
 

 

A reference attribute can only be represented with the “Description” attribute of the linked class.
Eventually
you can create a trigger on the database to concatenate other
information in the “Description” column on the referenced table (and if it contains redundant
information you can then make it not visible on the GUI).
CMDBuild Team

 

 

 

 

Thanks for the answer. I'm not strong in triggers.
 
Could you give the trigger code (example). To specify a field other than Description. As already implemented at http://demo.cmdbuild.org/
 
Previously Tecnoteca wrote:
A reference attribute can only be represented with the "Description" attribute of the linked class.
Eventually you can create a trigger on the database to concatenate other information in the "Description" column on the referenced table (and if it contains redundant information you can then make it not visible on the GUI).
CMDBuild Team

 

 

 

 

 

I added the function
 
CREATE FUNCTION public.set_data_tel_num ()
     RETURNS trigger
     LANGUAGE 'plpgsql'
     COST 100
     VOLATILE NOT LEAKPROOF
AS $ BODY $
BEGIN
   
NEW. "Description" = NEW. "Tel_Number";
        
RETURN NEW;
             
END;
                
 
$ BODY $;
 
ALTER FUNCTION public.set_data_tel_num ()
     OWNER TO postgres;
 
Tel_Number  - an atribut which should unite with Descriptium
 
Added this function in the table. But in the end nothing happens. Where is the mistake? Or that that I do not so?
 
Previously Anatoliy wrote:
Thanks for the answer. I'm not strong in triggers.
 
Could you give the trigger code (example). To specify a field other than Description. As already implemented at http://demo.cmdbuild.org/
 
Previously Tecnoteca wrote:
A reference attribute can only be represented with the "Description" attribute of the linked class.
Eventually you can create a trigger on the database to concatenate other information in the "Description" column on the referenced table (and if it contains redundant information you can then make it not visible on the GUI).
CMDBuild Team

 

 

 

 

 

 

Maybe this link can help you:

http://www.cmdbuild.org/forum/forum-in-english/908224516?b_start=0#561835818

CMDBuild Team

Is it possible to have this link fixed? I read several posts referencing to this link but I can’t open it. I want to check how to make a database trigger so I can populate a field to the description.

Thanks,