This add-in should do what you want.
function OnInit(initData) {
initData.name = 'TargetParent';
initData.version = '2021-06-23';
initData.copyright = '';
initData.url = 'https://resource.dopus.com/t/display-target-folder-in-a-column/38757';
initData.desc = '';
initData.default_enable = true;
initData.min_version = '12.0';
}
function OnAddColumns(addColData) {
var col = addColData.AddColumn();
col.name = 'TargetParent';
col.method = 'OnColumn';
col.label = 'TargetParent';
col.justify = 'left';
col.autogroup = true;
}
function OnColumn(scriptColData) {
var item = scriptColData.item;
if (item.is_dir) return;
if (item.metadata.other.target_type != 'linkfile') return;
var vecPath = item.metadata.other.target.Split();
scriptColData.value = vecPath(vecPath.count - 2);
}
ColumnTargetParent.js.txt (841 Bytes)