Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a question regarding of Getfieldselections() orders. I used the script below at loadeditor to choose ‘savedMonth1’ in order.
set vSelectedMonth1 = Subfield(Getfieldselections(savedMonth1),',',1);
set vSelectedMonth2 = Trim(Subfield(Getfieldselections(savedMonth1),',',2));
set vSelectedMonth3 = Trim(Subfield(Getfieldselections(savedMonth1),',',3));
set vSelectedMonth4 = Trim(Subfield(Getfieldselections(savedMonth1),',',4));
set vSelectedMonth5 = Trim(Subfield(Getfieldselections(savedMonth1),',',5));
Which works perfectly fine for the first five months of data set (Sep 22>Oct22 > Nov22 > Dec22> Jan23 )
Then I select the recent five months of Dec 22> Jan 23> Feb23 > Mar23 > Apr23 , the order of months gets messed up.
It shows as Feb 23> Jan23 > Dec22 > Mar 23> Apr23.
When I try Nov22>Dec 22> Jan 23> Feb23 > Mar23 , it displays Dec22>Nov22>Jan23>Feb23>Mar23 as well.
Do you know why is this happening?
AFAIK you couldn't influence the sort-ordering of values within the getfieldselections() unless you used numerical values. Means instead of Dec 22 you applies 202212 respectively dual('Dec 22', 202212).
Beside this you may consider a simplifying of the logic like:
count(
{< StringMonth1 = {"$=(subfield(concat(distinct StringMonth1, ',', NumericalMonth1), ',', 1))"}>}
Event)
AFAIK you couldn't influence the sort-ordering of values within the getfieldselections() unless you used numerical values. Means instead of Dec 22 you applies 202212 respectively dual('Dec 22', 202212).
Beside this you may consider a simplifying of the logic like:
count(
{< StringMonth1 = {"$=(subfield(concat(distinct StringMonth1, ',', NumericalMonth1), ',', 1))"}>}
Event)