How to get "real" column name

Hi all! o)

If I take a look through the columns a tab currently has, I get some strange id values instead of column names (for scripted columns only I guess).
Additionally, such a column seems to have multiple ids/names, and I currently see no way of mapping between them.
Let's take this small column script as an example: Column: ModifiedWithin (alternative to 'modified'-labels)
One of two columns added by this script is called "ModifiedWithin-Graph", the various ids for this column look like this:

  • it's called "ModifiedWithin-Graph" directly in the script
  • it's listed as "" in /dopusdata/scriptcolumns.oxc
  • it's listed as "20643" if I enumerate over the columns of a tab
  • and if you want to add/remove it, you need to call it using "scp:Column.Generic: ModifiedWithin/ModifiedWithin-Graph"

So how would I get to know from what script that column 20643 comes from? Where is the relation between all those ids and do we really need them like this?
My goal is to create something that adds all remaining/available columns of script at once on right clicking a script-columns header.
Another goal is to find out the missing/faulty script behind a zombie-column (it's part of a format, but does not show anything at all).

If there's a way to get from "20643" to "163" (in scriptcolumns.oxc), I could get through to the scripts file name via the script-guid.
But even this is of low value, because the SET command requires the internal scripts name to add/remove a column, and I do not have that if the filename is different.
Part of this topic is to question the general id handling here, but that's not my business and I wouldn't care if I could do what I planned to do. o)

Of course I would prefer to not scan through DOs data files. Those current column objects maybe miss a "parent" script reference and some easy to handle props like:

  • column.full_name -> full qualified column id -> "scp:Column.Generic: ModifiedWithin/ModifiedWithin-Graph"
  • column.label/header/name as defined within the script
  • column.script.file -> scripts file name
  • column.script.name -> scripts internal name
  • column.script.columns -> all brother and sister columns

Unless I overlooked something, columns cannot be part of some clever commands or mechanics right now.
Thank you for reading all this. o)


I need to push this a little.. o)
Aside the initial wish and usecases for more control over script columns and they ids, I have another one:

I currently have two main DO installations and they keep branching more and more for some time, because I don't know how to export folder formats from Setup-A and merge them into Setup-B without destroying what's working or making use of stressful manual reimplemenation of all the things.

I looked at how to extract a single folder format and how to insert it into another DO setup and surprisingly this seems to work excellent (folders.off seems to be watched/reread automatically?).

But unfortunately, these folder format definitions still make use of these "65738" column ids, which are different on every DO setup. So I need a way to map between these script column ids and the scripts they use to rebuild the ids accordingly on an import and to keep a folder format in working condition.

Is there a chance these 3 to 4 different ids used for a single script column can be reduced to 1 (fully qualified script column name maybe?) or can you provide methods in the scripting API that allows us to map and work these things on our own?

Thanks! o)

Interconnecting related threads: Get column names from header context menu

The difference should always be 20480 (0x5000 in hexadecimal).

The smaller number is the script column ID. The larger number is the global column ID, and script columns start at 20480 onwards.

So there's a pattern!? Hooray, thank you! o)

A change is in the pipeline to enhance the script Column object to report the proper names of columns from scripts, VFS plugins, etc. instead of returning internal ID numbers.

e.g. "opus7zip:crc" and "scp:Is Modified Column/IsModified"

It'll also add Header and Label properties so you can get the display-names of the columns.

That's good news, thanks for letting me know! o)

For mapping columns to their script resource, I guess I still need to look for their IDs though. But as far as I can see, the change should not have an effect on the IDs used for columns in the folder formats/script column config files. For safety and versatility reasons, maybe still provide access to the IDs of a column from a column header context menu or script column object if possible. A column name does not seem to be unique enough and might not necessarily allow to get through to the correct script resource. At least I noticed a lot of duplicate column names from scripts that do not longer exist in the configuration file (scriptcolumns.oxc).

<col id="17" name="IsModified" script="CE6BCFC8-F823-4EAE-9D93-035546ED61FD" /> <col id="18" name="IsModified" script="049679F6-BB84-4A14-84EA-BB58340BC1AD" /> <col id="19" name="IsModified" script="23BC50D8-955C-4080-90F0-8CD0FF095B9B" /> <col id="20" name="IsModified" script="3A90A325-390C-4CFC-81F2-8BCEAA30BE59" /> <col id="21" name="IsModified" script="762C9D3A-51CC-4121-AA9C-63F2163308A7" /> <col id="22" name="IsModified" script="323295F0-35ED-48D5-BD02-AD266FBC0B0E" />

There's an ID property which has the numeric ID if it is needed. (That's there already.)

Perfect, thanks! Wasn't aware it's already available in the script column object (and was thinking about this %header% placeholder as well).
All good! o)