Reference Selector with translation

0
Hi, I have a question about the reference selection. I have a simple domain model for my question, see below.  Each car has a colour, so I want to have a reference selector for the colour on my Car_NewEdit-Page. The name of the colour ist not stored in the colour entity but in the entity “ColourTranslation”. The user of my application should see the name of the colour in the language he choose in the application.  I cannot use a enumeration for that, because I need the possiblity to add new colours in the production system. If I connect the entity “Car” directly with the entity “ColourTranslation”, I have to move (and duplicate) all of the attributes of the entity “Colour” to “ColourTranslation”. That sounds not the right way.   What can I do to have a reference selector for the colour but with the name of the “ColourTranslation”? Maybe I need a different widget for that?
asked
1 answers
0

What you are missing is the calculated field in Colour that contains the translation. Create a calculated field and create a microflow that based on the Colour entity retrieves the CoulourTranslation based on its reference and the language of the user retrieves the ColourTranslation and returns that object in that microflow.

You can then use that calculated field in your reference selector.

Regards,

Ronald

 

answered