I’m testing @errante’s excellent script that adds script columns that return the last-modified-date of all files within a folder recursively (using Everything).
I use the script column in an evaluator column that shows relative dates (e.g. “3 days ago”) using Val("scp:Newest-Oldest/newest_modified_recursive").
It does work, however, when there’s a difference in how DOpus handles sorting of the actual script column and the “evaluator column based on the script column”:
Script column: all values are lazyly loaded, DOpus indicates incomplete/pending sort by a red sort arrow, and when all values are loaded, DOpus applies the final sort order.
Evaluator column based on the script column: lazy loading as well, but DOpus does not show the red sort arrow (it’s gray instead) and the sort order is not updated when all values are loaded, resulting in an incomplete/wrong sort order.
Follow-up: I found that DOpus shows the value 425.2 years for columns where the script column has not been loaded yet. Thus, it might be that DOpus considers the evaluator column (“Modified Rec. (rel)”) as “already loaded” and therefore it doesn’t trigger a refresh and also doesn’t show the red sort arrow.
When I ran some tests with the code you gave me, I noticed that's not the case (on my machine the load is actually 3–4 ms per folder, so there shouldn't be any waiting ?).
What I did notice in the example you linked me, is that you don't first check whether the value is available (in some cases the script may omit setting a value or set it to "").
So if you add this at the top:
That gets rid of the random number issue (which, in my case, happens when the value is "").
BTW, I was messing around and added age-related columns to that script.
In my tests the time difference is about 1 ms per folder vs Evaluator.
Keep in mind that Evaluator needs to call the script to calculate the value when it's not available. The script, on the other hand, just reuses an already-obtained value and formats it, hence the small difference. Also, your column example outputs a much more basic format than the one implemented in the script, which likely contributes as well.