50
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



2024-10-16 11-59-48
Nick Vandebriel
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

UserImage.jpg
Wilbye Descalsota

It works! Amazing! Thank you Nick!

2024-10-16 11-59-48
Nick Vandebriel

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.

UserImage.jpg
Wilbye Descalsota

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.

2024-10-16 11-59-48
Nick Vandebriel

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
UserImage.jpg
Wilbye Descalsota

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?

2024-10-16 11-59-48
Nick Vandebriel

Hey Wilbye,

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

UserImage.jpg
Wilbye Descalsota

Is this doable with an aggregate?

2024-10-16 11-59-48
Nick Vandebriel

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

UserImage.jpg
Wilbye Descalsota

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

2024-10-16 11-59-48
Nick Vandebriel
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

UserImage.jpg
Wilbye Descalsota

It works! Amazing! Thank you Nick!

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