How to select one specific entry of a One-To-Many-Relationship?

0
Hi community,   please see the following model:   I would like to select one specific entry of Text (e.g. with the language "en") in a text field of a page. The OutlineTemplate is available on that page, and I can navigate to Description (as it is a 1-1-relation), but not to Text (I think because it's a one-to-many-relation). In the following picture you can see that there is no option for selecting the Text_Description relation:  
asked
3 answers
0

No, there's no simple way, but you can create a nanoflow that retrieves the "en" entry by XPAth and add a nested data view having this nanoflow as a data source to your page.

answered
0

I would set a reference to the system.language for the text entity so you can use this in your XPath to retrieve for instance the same language as the current user.

And if you are looking for translatable data take a look at this forum post. It still holds: https://community.mendix.com/link/space/app-development/questions/5419

Regards,

Ronald

 

answered
0

Hello Holger,

My 2 cents on this -

1. Create another association which is one-to-one between description and text which represents the 'currently selected text' entity.

2. Associate the Text entity desired with the $currentSession object. If your logic needs it to be available across different pages and flows.

 

Note - both the above approaches are generic and broad responses with regards to your question, you may need to change you logic and flows accordingly.

 

Regards,

Shreyas

answered