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" 


 
2019-10-09 06-46-56
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
2019-10-09 06-46-56
Daniel Lourenço
Staff
Hi Robert,

Were you able to solve your problem?

Best Regards,
Daniel Lourenço
2018-03-08 20-43-12
Robert Chanphakeo
Daniel

It has been sorted. 

thank you.
2018-03-08 20-43-12
Robert Chanphakeo
It has been solved (works) but not very efficent.

EDIT: fixed, only 1 query is needed, thats better!
GetAddressLongDescription.JPG
2019-06-17 07-29-54
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.


2018-03-08 20-43-12
Robert Chanphakeo
Hi that is correct and thats the right way to do it.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.