Showing 2 attribute from the same entity in a Reference Selector?

0
Hi, I have an app where users can make a case, then manually associate it with another entity which defines the case type. This is its' own entity so that admins can flexibly add case types using a data grid in the future.   The case types have a 'description' and an 'acronym' as well as some other nondescript bits of data. Problem is, when selecting one of the rows from this entity to associate to, description or acronym on it's own don't really tell the user what they're selecting   Is there a way for a reference selector to display 2 of the attributes it is selecting the object of, in the dropdown field it is rendered in?   Failing that, does anyone know of a widget that does this?   Cheers all Luke
asked
3 answers
6

You can use the AutoComleteForMendix widget to show multiple attributes in the results of the dropdown

https://appstore.home.mendix.com/link/app/2695/AuraQ-Limited/AutoComplete-widget

 

answered
3

Hi Luke,

An easy way to do this which stays close to native Mendix is to simply store both values 'Description' and 'Acronym' in a CaseTypeDisplayString in the entity CaseType, which is updated in a Before Commit event on CaseType. Could be as simple as {Description} / {Acronym}.

 

Then, in the NewEdit form for Case, you display the CaseTypeDisplayString in the reference selector for selecting your CaseType.

 

Kind regards,
Jeffrey

answered
0

To my knowledge there is no such widget. The way I solved this is by showing two reference selectors. Not ideal but workable.

Regards,

Ronald

 

answered