69
Views
3
Comments
Solved
Tabs on change based on year

Could anyone help me to check my TabsOnchange formula in "Admindashboard" Page. It shows nothing  for the display. 

I have created a tab to show different data based on the "year" , Content of data refer to one aggregate (GetJobDetail). 

- Year has been added as calculated attribute for the aggregate

-Added "SelectedTabYear" as variable input 

- On Tab Change "TabsOnTabChange" has been added (Please help to check my logic)
  -->May I know what "TabsID" and "ActiveTab" mean and how they can refer to my tab title

 

Nothing now, 


Secondly, If above table is solved, how the tab change can effect on my Card as well, 
-->Here will show no. of record according to the status. I just put "TabsOnTabChange", please advise as well. Thanks 

Now, the card only show the count with year2023. 


Kindly check and advise on it. Thanks!!

Test_20230928_CHANGE.oml
2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Winnie,

First for the parameters of action TabsOnTabChange:

- TabsId: This is Id of tabs control (which we will use into Javascript to retrieve selected tab title)

- ActiveTab: Index of active tab. Please note that index starting from 0 so first tab index of year 2026 is 0 and for year 2025 index will be 1 and so on.

I did some changes to your module by deleting all aggregates retrieving details except original one "GetJobDetail"

Also I set default value of variable "SelectedTabYear" to first year into tabs which is 2026.

I added javascript code into action TabsOnTabChange to retrieve title of active tab (Year) then assign this value to variable "SelectedTabYear" then refresh aggregate.

Kindly find attached oml.

JobManagementPOC_V3.oml
UserImage.jpg
Kiran Shetty
Solution

@Winnie Lam 

Check the oml below  i have attached 

Regards,

Kiran

TabForYear.oml
2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Winnie,

First for the parameters of action TabsOnTabChange:

- TabsId: This is Id of tabs control (which we will use into Javascript to retrieve selected tab title)

- ActiveTab: Index of active tab. Please note that index starting from 0 so first tab index of year 2026 is 0 and for year 2025 index will be 1 and so on.

I did some changes to your module by deleting all aggregates retrieving details except original one "GetJobDetail"

Also I set default value of variable "SelectedTabYear" to first year into tabs which is 2026.

I added javascript code into action TabsOnTabChange to retrieve title of active tab (Year) then assign this value to variable "SelectedTabYear" then refresh aggregate.

Kindly find attached oml.

JobManagementPOC_V3.oml
UserImage.jpg
Kiran Shetty
Solution

@Winnie Lam 

Check the oml below  i have attached 

Regards,

Kiran

TabForYear.oml
2023-05-08 05-34-05
Piyali Saha

Hello Winnie,

TabsId: This is Id of tabs control (which we will use into JavaScript to retrieve selected tab title) but in Outsystems version11 this tabId is not present.

ActiveTab: Index of active tab. Please note that index starting from 0 so first tab index of year 2026 is 0 and for year 2025 index will be 1 and so on as stated by @Mostafa Othman 

I have deleted the extra aggregates of get job and created a getyear aggregate by grouping them by year to get the dynamic years directly from the entities. Then enclosed the tabs in a list and added the year a per the aggregate

Now for TabsOnTabChange I have passed the current year from getyear list to the input and assigned that input to the SelectedTabYear which is binded in the getjob aggregate filter to get data related to respective year. Hence it will get autoupdated when changing the tab.

Kindly refer to the attached oml for your reference and let me know if the issue still persists.

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