Combo box, showing multiple attirbutes

Combo box, showing multiple attirbutes

  
Hi All,

I'm trying to get a combo box in place that connects the child with it's parents.
The standard Combobox widget only shows one attribute, wihile I need more attributes to succesfully make my choice; in this case I would like to see the first and last name and the home adress of the parents.

To make it a bit more challenging, I also would like to be able to search in this combo box on firstname, lastname and address.

Regards,
Arnold
The quickest way to do this is by concatenating all the attributes into 1 string, and showing that one. It might not give you exactly what you expect though, because the layout of data can be very different, with long and short names, so it will not be the most elegant solution. But surely the fastest one to implement.
Hello Arnold,

The best way in my opinion is to create a structure only with the attributes that you need and in the Advanced Query you can concatenate the columns that you want to show.
This can give you a better performance and let you show all the attributes you need ;)

Regards,
Gonçalo M.


Arnold Grippeling wrote:
Hi All,

I'm trying to get a combo box in place that connects the child with it's parents.
The standard Combobox widget only shows one attribute, wihile I need more attributes to succesfully make my choice; in this case I would like to see the first and last name and the home adress of the parents.

To make it a bit more challenging, I also would like to be able to search in this combo box on firstname, lastname and address.

Regards,
Arnold
 
 
Hi Arnold,

Since you need searching, the best is to use the Auto-complete from RichWidgets.
Since the list of values/id's is built by you on teh callback method you can use concatenation to give the desired result.
You just need to very carefull because the callback is called with the typed value and you need to return all the matches for that. Example if the used typed "first last", then the callback needs to return all the matches that are valid for that, even through those are 2 different parts of your query.

Another option is to use a jquery combobox that allows searching. This way you just need to do the concatenations (like Gonçalo sugested) and don't have to worry about the searches. They are actually alot easyer to use than the auto-complete.
There are a couple components that do this on the forge, like the Choosen and the jQuery Goodies (I recommend this one since I'm in the team :P)

Regards,
João Rosado
Just a tip about the jQuery option.
Be carefull about the size of the dataSource because if it has many records you'll have some performance issues (yes I'm a little bit freak about performance..lol..).

Regards,
Gonçalo M.


Thanks all!

I only don't know how to program in SQL and I'm just trying to understand the Outsystems Platform. Can anyone provide me with one example (maybe of the included espace, for example screen Kind (Child)-> combo box to connect to the parents (Klant)?
I assume I than will be able to reproduce that for all the other events.

Regards,
Arnold

Edited by André Vieira on request of user to remove attachment.
Hi There,

I've been looking into SQL a little bit and from that point forward I've created an advanced query for the table Kind. As shown in the video in the academy I've set up a structure and that shows me the output when I test it.
Unfortunately I haven't been able to connect it correctly to the combobox Klant at the Kind_Table.

1. I only get the VoornaamOuder (being the firstname of the parent) and not the other columns I have created in the advanced query
2. It doesn't store the date, meaning that I can select a parent, but when I re-enter the same record again it hasn't been stored.

I've also downloaded the Jgoodie but have not used it yet. I first would like to solve this issue. (therefore ignore the comments when publishing).

Regards,
Arnold Grippeling

Edited by André Vieira on request of user to remove attachment.