How to show full path or hierarchical value in picker?

Hello,

I’ve searched the forum and I couldn’t find a solution to resolve the probled described below…

There is a hierarchical entity (i.e. Category, with a “parent” property).
Let the categories look like this tree

  • Toys
    – Age 0-2
    — Bears
    – Age 3-5
    — Cubics
    – Age 6-8
    — RC Toys

And there is another entity (i.e. OrderItem) that has a link to category

The question is how can I show category in picker this way
“Toys / Age 6-8 / RC Toys” ?
Not only “RC Toys”

Hi Alex,

I would recommend adding a persistent attribute for storing the full path, and using this attribute in @NamePattern.

To maintain consistency between the hierarchy and path names, use EntityChangedEvent or an entity listener.

Regards,
Konstantin