Hi everyone,
I'm currently working on a project in OutSystems and I'm facing a challenge with dropdown lists. I'm trying to get the attribute names for a dropdown list, but I'm not sure how to do it.
Could someone please guide me on how to retrieve attribute names for a dropdown list in OutSystems? Any help or examples would be greatly appreciated!
Thanks in advance!
Hi Anitha!
If you are using Dropdwon search or dropdown tags widget, you can do that on the OnChange Event.
If you go to the OnChange Event and create a client action linked to that dropdown, it will create an action that has as input a SelectedOption List. There you can retrieve the names, they must be the value.
Tell me if it helped!
Cheers.
Thanks for your response.Dropdown search and dropdown bring an attribute value based on ID. Is it possible to retrieve attribute names? For example, if an employee has attributes like name and age, I would like to display name and age in the dropdown.
The id is the identifier of the record, but it will show the name yes. In the dropdown, you just need to put the "entitiy.name" on the "Options Text", that it will show the name:
On the Dropdown Search, you just need to put the "entity.name" on the label value, that it will show the name:
Thanks @Mauro Alviza
First I recommend to go through below Outsystems react training that will better help you over all.
https://www.outsystems.com/training/paths/18/becoming-a-reactive-web-developer/
Please find below steps to add a drop down.
1. Create Entity
2. Enter some records in it
3. Drag and Drop DropDown Control on screen
4 Add a Aggregate of the newly created entity to the screen
5. Assign the List Property of DropDown via Aggregate return list
Attached is the oml.
Thanks for your response.dropdown bring an attribute value based on ID. Is it possible to retrieve attribute names? For example, if an employee has attributes like name and age, I would like to display name and age in the dropdown.
yes, check below for your reference (display name + age) as requested .. also an example is attached..
I understand your logic, but I need to display attribute names in the dropdown, such as 'name' and 'age,' not the values. Thanks for your response
my solution displays multiple attribute names in the dropdown, 'name' + 'age,' not the values, I can't get your concern.