How do I track down the errant script which is causing this annoying error?

Below is the error that continually writes to the script error log. I want to track it to the script I have loaded and report it to the relevant author for a fix. For all I know, it may be a bug in Directory Opus, but I doubt it.

08/04/2024 2:48 PM Evaluator: Error at line 1, position 1
Unknown value (6): %headerindex%
%headerindex% == -1 or %headerkey%=="index"

A search for the last line returns this thread/posting:

https://resource.dopus.com/t/filter-by-column-filter-bar-for-all-columns/47559/48

That's not part of the script, it's just a button, that should be placed in the column header context menu, and it looks like you didn't.
Explained a few posts later actually.

Yes, silly me. I was getting crashes with the latest DO beta, so I decided to uninstall and start from scratch, reloading all my tools in a quick and dirty manner. It eliminated the DO crash but introduced this script error. Certainly not your fault but mine since I'm one of those impatient people with a bad memory who never reads instructions. BTW congratulations on completing this script. It is a work of brilliance. Unfortunately, my light has never shined as brightly.

i've had the same\similar error the past few days after update to.. v13.4.6.B

4/8/2024 5:15 PM Evaluator: Error at line 1, position 24
Unknown value (6): %headername%
format(original_label, %headername%)
4/8/2024 5:15 PM Evaluator: Error at line 1, position 1
Unknown value (6): %headerindex%
%headerindex% == -1 or %headerkey%=="index"

i thought i had to with this script and figured at some point it'd get posted about or fixed with an update...

i do have that button added to my header context menu thou. and always have the index collumn-"#" turned on.

looking over your post again and am still lost to remedy this.

i even tried to add a column in the settings...

No, you don't need to edit anything from the script configuration for that to work, no.
As I said, it's just a button to run the command in a more convenient way, from the column header context menu. Did you place it in there?


(that error indicates that %headername% or %headerindex% are not recognized variables, which means that the button was placed somewhere else)

It's not required for you to have enabled the index column for it to function. The button is simply telling DOpus, "Do not display that entry in the context menu for the Index column or if it's not a column, for example, an empty space in the header."

yes that i have it

the sting in my mine is different thou... perhaps i missed changeing something as you were updating this script?

@label:=format(original_label, %headername%)
@hideif:=%headerindex% == -1
FilterbyColumn FILTER QUERY %headerkey%{dlgstring|Filter in "%headername%":}

ill double check the menus ive been creating. i may have tried to copy that button into a toolbar.... but which one. LOL, ive spent the past month heavily reworking the menu toolbar.

For a better experience, copy and paste this XML code into the column header context menu:

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" separate="yes" textcol="none">
	<label>Filter by &apos;%1&apos;</label>
	<icon1>#quickfilter</icon1>
	<function type="normal">
		<instruction>@label:=format(original_label, %headername%)</instruction>
		<instruction>@hideif:=%headerindex%==-1 or %headerkey%==&quot;index&quot;</instruction>
		<instruction>FilterbyColumn DIALOG=%headerkey%,filterall</instruction>
	</function>
</button>

(The one you posted will work too, if it's placed in the column header context menu, but is not the interactive dialog that you may want to use)

i found the button. i made a custom menu for quick column controls and tried to paste that button in there. no more blinking error. :slight_smile: