Hi Kevin,
Watch loc:vorder and loc:vordernumber These are set in sessionvariables abd return the field name or sortorder number of the currently selected sort.
Watch for FilterWas too
Look for ! Set Sort Order Options
Here is a sample of the code that follows -
loc:vordernumber = p_web.RestoreValue('UnitsList_sort',net:DontEvaluate)
p_web.SetSessionValue('UnitsList_sort',loc:vordernumber)
Loc:SortDirection = choose(loc:vordernumber < 0,-1,1)
case abs(loc:vordernumber)
of 12
loc:vorder = Choose(Loc:SortDirection=1,'UPPER(Iso:FLD_3letter)','-UPPER(Iso:FLD_3letter)')
Loc:LocateField = 'Iso:FLD_3letter'
of 1
loc:vorder = Choose(Loc:SortDirection=1,'UPPER(Uni3:UnitCode)','-UPPER(Uni3:UnitCode)')
Loc:LocateField = 'Uni3:UnitCode'
...
end
HTH,
chris