Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Below is the expression which I am using. But when clear button is clicked then the default data for max of year should display. how to achieve this?
Count({<Account_Table_ACSAT.Responded={'yes', 'Yes'}, Account_Table_ACSAT.Q2_Score={6,7},Year = {$(=only(Year))},Month=,Quarter=,Day=>} Account_Table_ACSAT.Responded)
/ Count({<Account_Table_ACSAT.Responded={'yes', 'Yes'},Year = {$(=only(Year))},Month=,Quarter=,Day=>} Account_Table_ACSAT.Responded)
Any help would be appreciated.
Thanks in advance!
Regards,
Ankita
Hi Ankita,
Use Max() or Maxstring() function instead of only()..
Only() function returns null when there are duplicate of multiple same values
HTH
Sushil
Thanks Sushil!
Apart from this may I know how to make default selection of year, quarter in a calendar to max year and max quarter. whenever application is logged in.
You can add action to select the max year in OnOpen trigger.
Thanks for reply!
Please guide with steps.
But this should clear this selection when clear button is cilcked.
Hi
No need to mess about with triggers and actions, As per Sushil Kumar's reply this should work:
Count({<Account_Table_ACSAT.Responded={'yes', 'Yes'}, Account_Table_ACSAT.Q2_Score={6,7},Year = {$(=max(Year))},Month=,Quarter=,Day=>} Account_Table_ACSAT.Responded)
/ Count({<Account_Table_ACSAT.Responded={'yes', 'Yes'},Year = {$(=max(Year))},Month=,Quarter=,Day=>}Account_Table_ACSAT.Responded)
Regards
Jonathan
1. For On open document defaults:
Settings -> Document Properties -> Triggers -> OnOpen -> Add Action(s) -> Add
Then:
Action type: "Selection"
Action: "select in Field"
Insert in Field: Account_Table_ACSAT.Responded
insert in Search String: Yes
2. For clear buttons / reset buttons to default:
Right click on the button -> properties -> Actions -> Add
Then:
Action type: "Selection"
Action: "select in Field"
Insert in Field: Account_Table_ACSAT.Responded
insert in Search String: Yes
Good practice to "Clear All" or Enter blanks before values e.g
Insert in Field: Account_Table_ACSAT.Responded
insert in Search String:
I want in calendar year selection as Current Year.
So,I have taken Field as Year and Search String as Max(Year).
But this is not working. When I open the application.