cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Several text types for an object

ATomlin
Super Contributor

Hello,

 

I would like to organise the Text field tab associated with the object  "Application" and have several text types appear in the drop-down list (eg. Description / Specificities / Constraints...) and the be able to choose the text I wanted to read, instead of having one very long comment field. 

This has already been done with the object "Message" (cf. enclosed file) but it was done by my predecessor and I don't know how

How do I go about creating this ?

Thanks for your help 

11 Replies

Smiley Happy

<script id="F5_watermark" type="text/javascript"></script>

Hello Emmanuel,

 

I guess there must be other parameters taken into account that I do not know about as before answering you I tried to create a varchar MetaAttribute on an Artifact (to verify indeed that there was no specific behavior on this metaclass) and it worked for me without compiling the metamodel...

 

In any cases, it is always better, after a metamodel modification, to compile the metamodel : in that case, you will not have any bad surprises 🙂

 

Lionel

<script id="F5_watermark" type="text/javascript"></script>

ELargant
Super Contributor

Thank you to you both for the answer.

As i said in my post, I was pretty sure that the title of the tab will switch from Comment to Texts ;o) but unfortunately it did not work. Yes I checked that my new MetaAttribute was of type VarChar.

 

But I have tried again today and after several tests I have found that the behavior of MEGA is different depending of the type of object:

- Adding a new MetaAttribute into Application object is taken into account directly (As Lionel explained in his answer)

- The issue I had of adding a MetaAttribute into Artifact object was finally the fact that I needed to translate and compile the metamodel. I restarted several times MEGA without translating and compiling, my new MetaAttribute was not taken into account. Today I have translated and compiled and it works perfectly.

- I have as well tried with Physical Asset object: It has been taken into account after restarting MEGA without translating and compiling even if MEGA has requested me to do it.

 

So I guess that to have a unique procedure whatever the object is at least to restart MEGA. Am I right?

 

Emmanuel

 

 

Hello,

 

As Jérôme said, the name of the tab depends on the number of Varchar MetaAttributes.

If yours does not appear, you must have failed somewhere during the creation (is it correctly linked to the metaclass ? Are you sure it is a "Varchar" metaAttribute that you created ?....)

 

Concerning the name of the metaAttribute, you cannot create several metaAttributes with the same name, but you can reuse the same one as many times as you want (as done in standard for the "comment" metaAttribute for example).

 

Regards

 

Lionel

Hello ELargant

 

The behaviour depends on the number of text MetaAttributes available for the MetaClass

  • One text MetaAttribute: the tab is named with the text name. Ex: 'Comment' or 'Definition'
  • Several text MetaAttribute: the tab is systematically named 'Texts' and a list enable to select which text is displayed

As it is NOT recommended to disconnect a standard MetaAttribute from a standard MetaClass, you can consider to filter it with the feature 'Metamodel Filter Management.'

See http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqbfAAA

 

For the readability of the forum, please create a new discussion (Menu 'New Message') for the issue 'create the same MetaAttribute for another MetaClass'

Jerome

ELargant
Super Contributor

Hi,

 

It works perfectly.

Unfortunately it works only for objects that have a Texts tab with drop-down list (like Application, Database, Diagram...).

How can we proceed for objects having only Comment tab (like Artifact)?

I have added the MetaAttribute but does not appear. I believed that the Comment tab would become Texts tab but it was in my dreams 😉

 

An other point is when I want to create the same MetaAttribute for another MetaClass, MEGA rejects me because it is already assigned to another object.

The typical example is when I want to create common Text types for several MetaClass like:

- Long Description

- Short Description

 

If someone can help me...it would be great ;o)

Thank you

ATomlin
Super Contributor

Yes it does, thanks.

ATomlin
Super Contributor

Thanks very much, it works perfectly.

One more thing, if you want to use RTF possibilities (bold, italic...) your have to update your metaAttribute as follow :

 

test9.jpg

lionel
MEGA
MEGA

Hello,

 

what you want to do is very easy. You just have to create a varchar MetaAttribute and link it to the Application Metaclass.

To do so, start by displaying the MetaStudio tab :

 

test1.jpg

 

Then, in the MetaStudio Tab, expand the tree "Metaclass > Metamodel", right click on the Application metaclass and choose "Properties" :

 

test2.jpg

 

In the MetaAttribute tab, click on the "New" icon :

 

test3.jpg

 

Choose the name for your new metaAttribute :

 

test4.jpg

 

Then right click > properties on your new metaAttribute

 

test5.jpg

 

Choose "VarChar" for MetaAttribute Type

 

test6.jpg

 

And that's all 🙂 You now have your new metaAttribute available for all your applications :

 

test8.jpg