issue in Displaying record from same db in multiple tabs in a screen based on filter

issue in Displaying record from same db in multiple tabs in a screen based on filter

  

Hi,
I'm having a screen with 3 tabs, each tab content is populated with records from same source ( but different filters ).
I have given preparation and set 1st tab as active tab and initial filter ( condition to display records in each tab ) of 1st tab as filter in preparation to fetch data.
To navigate from one tab to another, i have linked each tab back to current screen giving filter ( condition to display records)  and ActiveTab ( input variable to store current active tab ) as argument .

The problem arises is the tabs flicker twice on click , ( on click )  first they show the data of prevoius "tab"  ( the content of all 3 tabs are populated with same source ) then immediately the navigation to self ( screen)  is executed with filters and correct data  is fetched ( from preparation)  and then displayed.
So my question is how to stop the previous data from displaying momentarily. It should take the filter ( args ) and execute preparation based on filter and then display the filtered fresh data.

Is there any alternate way of doing it ?

Thanks

Hello Anand,

Why don''t you use a single table records, with a filter that choose the records based on the "status" selected by the user.

When the user click the status he wants to see, you make a data refresh on your source and an ajax refresh on the table.

Than you don't need to go all this thing with tabs...

Cheers.

Hi Anand,

So first of all I would suggest you take a look at for example an ButtonGroup which is a nice alternative to links and radio buttons. Second if you use the ButtonGroup you could bind different filters to the buttons and have a local variable (or a session variable) to hold the selected filter choose. At last you could use the OnChange of the ButtonGroup to refresh your aggregate and Ajax Refresh your table which doesn't make the page flicker because only a partial submit is done.

Because this is quite basic OutSystems behavour I would advice you to take another look at the Widgets II module from the Developing Web Applications Bootcamp (https://www.outsystems.com/learn/lesson/856/widgets-ii/) and the corresponding exercise. (https://www.outsystems.com/learn/lesson/855/data-queries-and-widgets-ii-exercise/)

Hope this will help you!

Kind regards,
Martijn Habraken

Thanks for quick response @Edward and @Martijn .
I have understood your suggestions and going to implement it.
Will let you guys know if it solves my problem or any other issue arises.

From your suggestions I realized that I might have complicated my code using my previous logic.


Thanks and regards,
Anand Das