Using IF and Integers to generate dynamic tabs

Outsystems 11

Using tabs control / reactive web application

I have a scenario as follows:

Data aggregation builds me a list of content fields ordered by an Order attribute.

Order | description | item

           1 | lunch | taco 

           2 | Side | salad 

           3 | Drink | Beer

I want to loop through the list to create the tabs and content 

  Tab 1


          Tab name = lunch 

           Content = taco

   Tab 2 


           Tab name = Side 

            Tab Content = Salad 

I used IF statements as follows to iterate through (knowing I’d have 3 tabs):

   If getorderlist.current.Order = 1

                    Tabname = description
                     Content = item

It seems to get lost on this method tracking the different columns between the numbers. Has anyone seen issues with the tab control and or if statements?

Is there a better way that would also ensure completeness and accuracy? Is there a way to do a for loop instead where I could just iterate through for all entities (filtering of course to prevent too many tabs as generally we would only have 1-10.

Rank: #91

Hi Jeremy,

I have created a sample application- DynamicTab demonstrating the implementation for the mentioned use-case.

See the attached .oml solution file

Hope this helps you!


Benjith Sam