I’ve created an evaluator column which shows the name of the server that the log files were downloaded from by extracting the detail from the filename.
I’d now like to create an evaluator group so I can group the logs by the server they were downloaded from. I could add the same regex based code I used to generate the evaluator column but instead of duplicating code is there a way for me to directly reference the evaluator column so I can just say group by this column and use the server names listed in the column as the group headings?
If I right-click and select group it just groups them alphabetically instead of using the name of the server. When I recreate the code from the eval column in the eval group it groups them by using the actual server name as specified in the eval column.
As an example, here’s my eval column with the server names.
When I do a normal group it just groups them alltogether under Q-Z as both servers start with S.
That does fix it for the folder format but is there a way to turn grouping off and on and keep it grouping by the eval group contents instead of reverting back to the alphabetical grouping?
It's one of those things where sometimes I want to group and sometimes I don't so I was hoping I could group via the normal method of right-clicking the column and selecting group.
// sort by modified date
if (operation == "sort")
return modified;
// today?
today = Now();
mod_date = DatePart(modified, "date");
if (mod_date == DatePart(today, "date"))
{
if (operation == "group")
return "Today";
return DatePart(modified, "time");
}
// if grouping, work out how old
if (operation == "group")
{
if (modified > today)
return LanguageStr(5793); // future
mod_year = DatePart(modified, "yyyy");
today_year = DatePart(today, "yyyy");
if (mod_year == today_year)
return LanguageStr(5800); // earlier this year
if (mod_year == today_year - 1)
return LanguageStr(5801); // last year
return LanguageStr(5802); // a long time ago
}
return mod_date;
XML
<?xml version="1.0"?>
<evalcolumn align="1" attrrefresh="yes" autorefresh="yes" category="date" customgrouping="no" foldertype="all" header="Modified" keyword="modifiedsimple" maxstars="5" namerefresh="no" reversesort="yes" title="Modified (simple)" type="0">// sort by modified date
if (operation == "sort")
return modified;
// today?
today = Now();
mod_date = DatePart(modified, "date");
if (mod_date == DatePart(today, "date"))
{
if (operation == "group")
return "Today";
return DatePart(modified, "time");
}
// if grouping, work out how old
if (operation == "group")
{
if (modified > today)
return LanguageStr(5793); // future
mod_year = DatePart(modified, "yyyy");
today_year = DatePart(today, "yyyy");
if (mod_year == today_year)
return LanguageStr(5800); // earlier this year
if (mod_year == today_year - 1)
return LanguageStr(5801); // last year
return LanguageStr(5802); // a long time ago
}
return mod_date;</evalcolumn>