Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Robert Chanphakeo
3
Views
6
Comments
ComboBox - Source Attribute
Question
How do you select and show more than 1 source attribute in the combobox dropdown menu?
Example
You have an ADDRESS entity, it contains attributes such as "RecipientName", AddressLine1, AddressLine2, etc...
Now you want to show all this information in the combobox dropdown menu in a single row
"RecipientName AddressLine1 AddressLine2 etc"
"RecipientName AddressLine1 AddressLine2 etc"
"RecipientName AddressLine1 AddressLine2 etc"
Daniel Lourenço
Staff
Hi Robert,
To do that, you'll need to iterate your
ADDRESS
records list in the prepartion of the screen and create an auxiliary list where you put the ID and the Address value as you want displayed on the list.
The steps would be:
Create a new structure
AddressCombo
with two fields
AddressId
and
AddressLongDescription
;
In the preparation of your screen, iterate the
ADDRESS
list with which you want to feed the combo box and, for each record, fill in a
AddressCombo
record and append it to a
AddressCombo
record list on screen (
see the List Append built-in action help
)
In your combo widget, set the
Source Record List
property as being the list you created in the previous step. Set the Source Entity / Structure, Source Attribute and Source Identifier to
AddressCombo
,
AddressLongDescription
and
AddressId
(see the documentation in the
Present the Value of an Attribute
and
Web Combo Box Widget properties
Service Studio combo box help pages)
Hope this helps,
Best Regards,
Daniel Lourenço
Daniel Lourenço
Staff
Hi Robert,
Were you able to solve your problem?
Best Regards,
Daniel Lourenço
Robert Chanphakeo
Daniel
It has been sorted.
thank you.
Robert Chanphakeo
It has been solved (works) but not very efficent.
EDIT: fixed, only 1 query is needed, thats better!
GetAddressLongDescription.JPG
Hermínio Mira
hi,
This was the simplest way I could think of to solve your problem in a more efficient manner.
This assign would be to the field you chose to use in your comboBox.
Robert Chanphakeo
Hi that is correct and thats the right way to do it.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...