Skip to main content

Did you ever use valueList:property trait? No? Maybe this article will change your mind.

What are traits

First things first. What are traits? Traits are used to enable additional configuration on our entities in the metadata model. They are either property traits (applied to properties) or entity traits (added to entities). Example can be a trait called fe:term that allows to give a term subtype a different color. Link to the full list of traits as well as how to apply them can be found at the end of this article.

Why to use valueList:property trait

Now, what is valueList:property trait? It is a trait that will (simply put) make properties look like terms. It will change the design from the underlined text or list of underlined entities to small boxes. While it adds more to the design of the layout, it can also be very beneficial for arrays of embedded objects. If you have many values for this type of property, Ataccama will show only first 10 values and additional will be on other pages. And without the ability to search through those values, you don’t know what all the values are without listing through all pages. Using this trait, you will see all values on one page.

Let’s show it on an example. Let’s say we have a new property in our glossary terms called Tags. We can have as many tags as we want. It’s implemented as some List of Values and in the term object we add tags as Embedded Object Array.

Now without the trait, I can see only first 10 tags and I cannot search through them in the term itself. When adding a new tag, I can only add one and I cannot see what tags were already added. Imagine there are 50 tags on 5 pages, you would have to go through all to verify if the tag is already there. There is no unique constraint by default, so duplicates are allowed.

The box for the tags itself looks like a big new table that takes a lot of space on the screen:

 Now let’s add the valueList:property trait to the tags property in the metadata model and publish the change. And voilà:

Tags are displayed as small boxes, you see all of them right away and one more benefit: When you want to add more, you choose from checkboxes, and you see that the ones already added are already checked!

So, ready to try it out?

Resources

Quick Question,  what does this term look like when is it associate to an catalog item within the Data Catalog? 


Hello @Catherine , what do you mean by term? I used the Academic Title term just as an example, you can put the trait to any property that is located in any entity (rule, catalog item, ...). So this term will look the same as usual. Or do you mean by using the fe:term trait that changes the color? 


@anna.spakova , I am trying to understand when and what is the best way to utililize “tags” with a term.  I am thinking it is used when you want to create an hierarchy with your terms or connect related terms.  Is that correct? 


Hi @Catherine I see your point now. Well, I mainly used these tags to demonstrate the trait, for that I needed a property that can have many values. And I acutally had a customer recently that asked about these tags → their main usecase was to use them for searching. But at the end we agreed that they would rather have more specialized properties, e.g. Security Classification with values like Personal data or Public instead of these general “tags”.

For hierarchies and connecting to related terms I would rather recommend to use the in-built Relations feature. You can have more relationship types, not only Parent-Child, but you can have also something like Related To or Synonym (although synonyms are actually already prepared in terms).

 


@anna.spakova  Thanks this helps alot.


Reply