19
Views
7
Comments
Solved
append dynamic integer to dropdown value

Hi All, 

I'm working on a reactive web application, I have a dropdown and I'm fetching the data for the dropdown from the static entity. I need to append a dynamic integer to the static entity value. For eg If I have Inbox in my dropdown I must append inbox mail count value to the dropdown. How can I achieve this?

mvp_badge
MVP
Rank: #89
Solution

Hi Kavya,

From your previous related post, I guess you will be having 3 options as the dropdown option values 

My dropdown has to be listed as "Inbox, Physical Delivery and Archive". 

As per the mentioned use-case, I would suggest you to 

1) Define an OnAfterFetch handler action flow for the Aggregate (with Static Entity as source) which is currently mapped with the dropdown widget

2) Within the OnAfterFetch action flow, build a Dropdown List explicitly using the ListAppend client action

3) Before the ListAppend action the Dropdown List record values will be referred from the current entity result set values as well as you will be referring the respective option count values  i.e. Inbox count etc.. from the respective associated aggregate result-set value

4) Map the newly created Dropdown list to the respective Dropdown widget

Note: For the purpose, you can refer the DropdownItem Structure from the OutSystemsUI module


Hope this helps you!


Regards,

Benjith Sam

Rank: #614

Hi Kavya,

Follow the below steps to do so,

1. Change the drop down "Options Content" as "Custom".


2. Drag and drop expression widget inside the drop down and append value as you want to show inside the drop down.

Hope this will help you

Regards,

Vipasha


mvp_badge
MVP
Rank: #89
Solution

Hi Kavya,

From your previous related post, I guess you will be having 3 options as the dropdown option values 

My dropdown has to be listed as "Inbox, Physical Delivery and Archive". 

As per the mentioned use-case, I would suggest you to 

1) Define an OnAfterFetch handler action flow for the Aggregate (with Static Entity as source) which is currently mapped with the dropdown widget

2) Within the OnAfterFetch action flow, build a Dropdown List explicitly using the ListAppend client action

3) Before the ListAppend action the Dropdown List record values will be referred from the current entity result set values as well as you will be referring the respective option count values  i.e. Inbox count etc.. from the respective associated aggregate result-set value

4) Map the newly created Dropdown list to the respective Dropdown widget

Note: For the purpose, you can refer the DropdownItem Structure from the OutSystemsUI module


Hope this helps you!


Regards,

Benjith Sam

mvp_badge
MVP
Rank: #89

Hi Kavya, 

In addition with my previous comment.. attached a sample .oml file

See this sample app - DynamicDropdownDemo

Hope this helps you!


Kind regards,

Benjith Sam