19
Views
5
Comments
Solved
Dropdown values are not getting added to list
Question

I use dropdown tags and it uses a list coming from a data action. The data action output has correct data.

As you can see, all the structure attribute are filled with correct data. 
Now, the dropdown widget has correct mapping too. 

I tried adding the display name to the ImageUrlOrIconClass because it getting a null value, but it showed a value if DisplayName is on it. 
When I tried swapping the label and the imageurlorIconClass: I get an error The Role attribute is also in Text data type, but swapping it to Value or Label attributes result to an error that Role can't be identified in the expression



Edit: Mapping is fixed now.

Back to my main issue,


As shown in this image, the attributes all have values. I mapped the dropdown option like this:

If I mapped DisplayName unto the Label, the dropdown shows the Names however Roles are still blank. So I tried putting Role unto the Label to check if ImageUrlOrIconClass is working, and it correctly show the DisplayName but the Label shows empty values like this:

2021-04-09 11-42-43
assif_tiger
 
MVP
Solution

Dear,
- If you pass URL it will render it 
- If you pass icon class it will load it [ ex: fa fa-bell]
- If you pass random text then it will not show anything

https://success.outsystems.com/documentation/11/building_apps/user_interface/patterns/using_mobile_and_reactive_patterns/interaction/dropdown_tags/

2023-09-07 20-35-56
Pawan Parmar

Hi @Siaming Ming 

It might be due to a data type mismatch.
Could you please hover over the label and share the exact error message you're seeing? 

Thanks

UserImage.jpg
Siaming Ming

Hi @Pawan Parmar
I just closed service studio and repeat mapping and it now works. My main issue is now that the Role from DataAction is not getting added to the dropdown.

2021-04-09 11-42-43
assif_tiger
 
MVP

Hi,
Use Label to show the text you want ex: RoleName [ considering its a text]
Use Value to hold the reference of selection [ that could be Role.Id or the ID in your case]
Use ImageUrlOrIconClass for image purpose 

  • Dropdown shows what’s inside Label only.

  • Role should be mapped to Value, not Label unless you want to show it.

  • ImageUrlOrIconClass expects an image URL or CSS class, NOT normal text.

    Good Luck

UserImage.jpg
Siaming Ming

Hi @assif_tiger
So ImageUrlOrIconClass will not show anything even if the datatype of the attribute is Text if ever I pass a text value on it?

2021-04-09 11-42-43
assif_tiger
 
MVP
Solution

Dear,
- If you pass URL it will render it 
- If you pass icon class it will load it [ ex: fa fa-bell]
- If you pass random text then it will not show anything

https://success.outsystems.com/documentation/11/building_apps/user_interface/patterns/using_mobile_and_reactive_patterns/interaction/dropdown_tags/

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.