Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to overrule the main calendar end taking over the selection to another calendar using set analysis.
This is what I came up with ...
count({<
Calls.StartDate_Year ={$(=if(GetSelectedCount(Year)>0,GetFieldSelections(Year)))},
Calls.StartDate_Month ={$(=if(GetSelectedCount(Month)>0,GetFieldSelections(Month)))},
Calls.StartDate_Week ={$(=if(GetSelectedCount(Week)>0,GetFieldSelections(Week) ))},
Calls.StartDate_Day ={$(=if(GetSelectedCount(Day)>0,GetFieldSelections(Day)))},
Year=,Month=,Week=,Day=>}
Callnr
)
The only problem with this script is that if one of the used fields Year/Month/Week/Day is not selected this is not working.
I need something to resolve the GetSelectedCount(xxx) = 0 ...
anyone got ideas to solve this??
What about this:
Count({<
Calls.StartDate_Year ={$(=if(GetSelectedCount(Year)>0,GetFieldSelections(Year), '*'))},
Calls.StartDate_Month ={$(=if(GetSelectedCount(Month)>0,GetFieldSelections(Month), '*'))},
Calls.StartDate_Week ={$(=if(GetSelectedCount(Week)>0,GetFieldSelections(Week), '*'))},
Calls.StartDate_Day ={$(=if(GetSelectedCount(Day)>0,GetFieldSelections(Day), '*'))},
Year=,Month=,Week=,Day=>} Callnr)
What if you use Concat function instead of GetFieldSelections?
Count({<
Calls.StartDate_Year ={$(=Concat(Year, ','))},
Calls.StartDate_Month ={$(=Concat(Month, ','))},
Calls.StartDate_Week ={$(=Concat(Week, ','))},
Calls.StartDate_Day ={$(Concat(Day, ','))},
Year=,Month=,Week=,Day=>}
Callnr
)
Replace as below
$(=if(GetSelectedCount(Year)>0,GetFieldSelections(Year),Max(Year)))
and so on.
in this case the max(year) will give a year selections ... but what i need for 'no field selected' in Year:
{< Calls.StartDate_Year = >}
and when year is selected I need
{< Calls.StartDate_Year = {$(GetFieldSelections(Year))}, Year= >}
To prevent a lot of coding I want to get it in set analysis ... Else I have to write for every possible selection combination a lot of code ...
this doesn't seem to do the trick
What about this:
Count({<
Calls.StartDate_Year ={$(=if(GetSelectedCount(Year)>0,GetFieldSelections(Year), '*'))},
Calls.StartDate_Month ={$(=if(GetSelectedCount(Month)>0,GetFieldSelections(Month), '*'))},
Calls.StartDate_Week ={$(=if(GetSelectedCount(Week)>0,GetFieldSelections(Week), '*'))},
Calls.StartDate_Day ={$(=if(GetSelectedCount(Day)>0,GetFieldSelections(Day), '*'))},
Year=,Month=,Week=,Day=>} Callnr)
If doing the same with fields containing strings ... what's the best way?? using the getfieldselections? of using concat?