Page 1 of 1

Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 10:31
by muzicman82
I'd like to create custom column that does this...

client.01.02.20.jobname.jobsite.somedocumenttitle.doc

The column would display this, ignoring the first word (client) and the date which is segmented by dots.
jobname.jobsite.somedocumenttitle

I assume that once this column is set up, I can then sort by the results.

Thoughts?

EDIT. I think this is working for me to show segments as needed, just concatenating the ones I want to show.

Code: Select all

$base = getpathcomponent(<cc_name>, "base");
$filter1 = gettoken($base, 5,".");
$filter2 = gettoken($base, 6,".");
$full = $filter1.".".$filter2;
return $full;

Re: Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 10:55
by highend
return regexreplace(<cc_item>, "^(.+\d{1,2}\.\d{1,2}\.\d{2,4}\.)(.+?)(\.[^\.]+)$", "$2");?

Re: Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 11:00
by muzicman82
highend wrote: ↑24 Apr 2020 10:55 return regexreplace(<cc_item>, "^(.+\d{1,2}\.\d{1,2}\.\d{2,4}\.)(.+?)(\.[^\.]+)$", "$2");?
Thanks!

Is it possible to use a Custom Column result, and quickly apply that as a tag? Like, in the Tags field, can I just enter a variable like "My Column Name" and it applies whatever is in that column as a tag to the selected files?

Re: Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 11:01
by highend
Sure, via scripting.

Re: Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 11:34
by muzicman82
highend wrote: ↑24 Apr 2020 11:01 Sure, via scripting.
Well, I figured that. How do I access the data in a column for scripting? Are there variables for columns by name or does it have to be by a specific position?

Re: Custom Column Filter Help - Truncating Filenames

Posted: 24 Apr 2020 11:36
by highend
Via report()

Read the help file entry for it, especially: "Extra Columns" & "Custom Columns"