Evaluator group based on evaluator column

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?

You don't need an evaluator group to group evaluator columns - just right-click the column header and pick Group or use a command.

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.
image

When I do a normal group it just groups them alltogether under Q-Z as both servers start with S.
image

Turn on the 'Never combine values' option in the folder format (Grouping tab).

Not possible to add this option to the Evaluator column editor ?
So when we group evaluator column, option in editor is the default state

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.

In the next beta we'll add an option which will let evaluator columns control their default grouping behaviour.

3 Likes

This is in 13.2.1.

1 Like

Possible to have it here please

// 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 == &quot;sort&quot;)
	return modified;

// today?
today = Now();
mod_date = DatePart(modified, &quot;date&quot;);
if (mod_date == DatePart(today, &quot;date&quot;))
{
	if (operation == &quot;group&quot;)
		return &quot;Today&quot;;
	return DatePart(modified, &quot;time&quot;);
}

// if grouping, work out how old
if (operation == &quot;group&quot;)
{
	if (modified &gt; today)
		return LanguageStr(5793); // future
	mod_year = DatePart(modified, &quot;yyyy&quot;);
	today_year = DatePart(today, &quot;yyyy&quot;);
	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>
1 Like

If the old default hasn’t been edited it in Preferences, you should get the new default automatically. (But if it’s edited, it will be left alone.)

I never deleted my post !

I've restored it. (You can too, via the edit history icon at the top right of the post.)

Doesn't show any log of anyone else editing/deleting it. (If we deleted it, it would be removed entirely.)

This works great. Thank you for adding it.