// Called by Directory Opus to initialize the script function OnInit(initData) { initData.name = "NameLengthColumn"; initData.version = "1.0"; initData.copyright = "(c) 2017 Leo Davidson"; initData.url = "https://resource.dopus.com/viewtopic.php?f=3&t=28687"; initData.desc = "Name Lengh Column"; initData.default_enable = true; initData.min_version = "12.0"; var col = initData.AddColumn(); col.name = "NameLength"; col.method = "OnNameLength"; col.label = "Name Length"; col.justify = "left"; col.autogroup = true; col.type = "number"; } // Implement the NameLength column function OnNameLength(scriptColData) { scriptColData.value = scriptColData.item.name.length; }