I have two tab (tab inside a tab), My count here would like to display the relevant value.
SelectedTabYear + SelectedAuditor
- Currently, I can set up the logic with the count with SelectedYear Change, But I dunno how to handle another tab(SelectedAuditor) inside the change,
- I have added one more Input parameter: ActiveTab2 (which is text)
- I have added aggregage : Auditor.Auditor=SelectedAuditor
I tried to add more more switch after SelectedTabYear but it seems not work , could anyone guide me how to implement the SelectedAuditor in order get my count change base on the YearTab&AuditorTab??? Thanks.
Hi @Winnie Lam,
Based on your question, it seems like you want to show data based on some filters. While tabs are actually showing different content everytime you switch tab, i just want to offer the idea that you could also think of other solutions then only tabs. One example i quickly created is with just a some clickable filters shown in a list on the left. These filters can then be used in the queries ofcourse. Please check out the oml, i hope it can help you think of different ways to reach your goal!
Would like to hear from you.
Kind regards,
Jobbe
what about the count, cuz my count is based on two parameter (Year and Auditor), what I can do now is to get the count based on the year only.
Please open my oml and see the screen aggregates i added to get the counts. Each count has it's own aggregate which contains 2 filters based upon what's selected in the 2 filter parameters. You could use the same principle to filter your counts.
Please let me know if this helps you.
Hi Winnie,
My first suggestion would be to make use of blocks. Each block is responsible for a certain part of the app. This will make development a bit easier as it will minimize the variables, data queries and actions inside a block.
The first block would be the year selector. When someone clicks on a year an event (OnSelect) is thrown that will have the Year identifier and the handler will update the "SelectedYear" variable.
A second block would use the "SelectedYear" as input and query all relevant data around this. When it has collected all data it will throw an event "OnDataFetched" with a parameter of the item count of the aggregate. When an item is selected it will also throw an event (OnSelect) that will return the identifier of the selected item. The handler will put this in a "SelectedEvent" variable.
A third block would use (both?) SelectedYear and SelectedEvent variables as input. It will then collect all data based on these inputs. When done it will throw and event (OnDataFetched) with the total number of items retrieved.
Be sure to use the "OnParametersChanged" event of the block to refresh all data sources. Service Studio will also indicate this to you as a warning.
I hope this helps.
Greetings,
Vincent
ps. there is nothing wrong with using 2 end nodes. This will make the code more readable instead of that arrow going from the right side of the action to the only end node. ;)
Hi @Winnie Lam ,If I got your point right, your aggregate which populates the list on the screen should have 2 filters: one for Year AND one for the Auditor. Then, if you have pagination on your list you probably want to replicate your aggreate, removing only the StartIndex and the MaxRecords.After that its just a matter of looking into the Count Property of your new Aggregate, and be sure you refresh both aggregates when your inputs change.If the values of the inputs come from different blocks, you'll have to handle the value change for those with a Notify, and have their values always updated on the page (with 2 variables that are used to filter the Aggregate which provides you the Count).
Hope it helps.
Would you mind to share your advise in oml to me for my study? Thanks.