18
Views
10
Comments
Solved
Is it possible for us to create a dynamic combo box?

I have a combo box where the list of value came from an entity, Is it possible for us to make the combo box display and select upon preparation the values based on its respective IDs?

Options of the combo box is shown in the image below:

Here are the properties of the combo box: (*NOTE: I haven't changed the variable type of Level into text



Rank: #2437
Solution

Hello,


Good to hear you're making progress :) 

try using 2 aggregates in your preparation, one like the one above where you did the group by and the other just without the group by but with the filter. Use the group by as list and the filtered aggregate as variable

It works! Amazing! Thank you Nick!

Rank: #2437

Hello Wilbye,

How do you want to determine the values coming from the aggregate? If it's through an input parameter you could just add a filter by doing something like: categorieId=categories.Id. This would in this case only show "mid" in your combobox.

Is it possible to display Junior, Mid, Senior and etc when we click combo box but the default value of the combo box upon preparation would be the one that is matched with the ID.

eg. If I have id 258 I'll display/select lead in the combo box upon preparation but when I click the combo box, I can see the other option such as Junior, Mid and Senior.

Rank: #2437

Hello Wilbye,

I think a better approach would be to use a static entity for the lvls then, see oml for my proposed solution


CategoriesApp.oml

In this area:

I removed the Special List Values and now displays:

Is it doable to display/select "Mid" and still have the other options?

Rank: #2437

Hey Wilbye,

Try creating a categorie and clicking on it again and it will take the chosen level when going to the page

Is this doable with an aggregate?

Rank: #2437

Yes you just replace the static entity in my example with a normal aggregate and define ur levels there.

I have an aggregate where I grouped the data by Level as shown in the image below:

and surely it displays the Grouped Levels in the combo box: *Note: (Does not select the Level which is Mid, I have the ID of 256)

img 1:

img 2:

But when I add the filter using the ID to display/select the Level for a certain data, it only display/select the Level with the matching ID.

This is my filter:

We're getting close! :D

Rank: #2437
Solution

Hello,


Good to hear you're making progress :) 

try using 2 aggregates in your preparation, one like the one above where you did the group by and the other just without the group by but with the filter. Use the group by as list and the filtered aggregate as variable

It works! Amazing! Thank you Nick!