Leo
October 2, 2023, 5:59pm
1
Here's a quick example of how to set up a custom way to group files.
The aim is to take each filename, remove anything after the first bracket, and use what's left as the group name:
Setting it up:
Go to Preferences / File Display Columns / Evaluator Groups
Click Add Scheme
Give it a name, and paste in this code:
s = Stem(value);
pos = InStr(s, " (");
if (pos <= 0) return s;
return Left(s,pos);
Assign it to the Name column:
Using it:
Right-click the Name column and it'll be one of the grouping options:
1 Like
Leo
October 2, 2023, 5:59pm
2
See Evaluator Functions for documentation on built-in functions Evaluator code can use.
The code editor can also give you a list of functions and variables, with basic information about each:
1 Like
David
October 8, 2023, 2:31am
4
So `value' as an index column is an integer data type ?
Division results in an integer data type and does not result in any Modulus remainder or data type conversion ?
For instance, 12 mod 10 = 2 .
It works great !
Thanks !
lxp
October 21, 2023, 12:06pm
5
Group by Year and Month or Year and Week of dates
Evaluator clause:
return DatePart(value, "yyyy-MM");
or
return DatePart(value, "yyyy-WW");
Columns:
Modified (date)
Modified (date and time)
... (any date field)
Result:
Scheme as XML
<?xml version="1.0"?>
<evalgroupscheme desc="Year and Month" scheme_name="yyyy_MM" sort="yes">
<eval>return DatePart(value, "yyyy-MM");</eval>
<groups enable="no" />
</evalgroupscheme>
4 Likes