ersetze .reverse()[0] durch [-1]
This commit is contained in:
parent
1c77a9ab50
commit
192bbef02d
|
@ -35,7 +35,7 @@
|
||||||
{
|
{
|
||||||
"type": "list",
|
"type": "list",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"expression": "grel:with(value.cross('muenster', columnName), rows, if(rows.length() > 1, if(rows.index.sort().reverse()[0] > row.index, 'is duplicate of a higher row number', 'has duplicate(s) with lower row number'), 'unique'))",
|
"expression": "grel:with(value.cross('muenster', columnName), rows, if(rows.length() > 1, if(rows.index.sort()[-1] > row.index, 'is duplicate of a higher row number', 'has duplicate(s) with lower row number'), 'unique'))",
|
||||||
"columnName": "id",
|
"columnName": "id",
|
||||||
"invert": false,
|
"invert": false,
|
||||||
"omitBlank": false,
|
"omitBlank": false,
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
"mode": "row-based"
|
"mode": "row-based"
|
||||||
},
|
},
|
||||||
"columnName": "mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID",
|
"columnName": "mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID",
|
||||||
"expression": "grel:'FILE_' + row.record.cells['id'].value[0].split(':').reverse()[0] + '_' + (row.index - row.record.fromRowIndex + 1)",
|
"expression": "grel:'FILE_' + row.record.cells['id'].value[0].split(':')[-1] + '_' + (row.index - row.record.fromRowIndex + 1)",
|
||||||
"onError": "keep-original",
|
"onError": "keep-original",
|
||||||
"repeat": false,
|
"repeat": false,
|
||||||
"repeatCount": 10,
|
"repeatCount": 10,
|
||||||
"description": "Text transform on cells in column mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID using expression grel:'FILE_' + row.record.cells['id'].value[0].split(':').reverse()[0] + '_' + (row.index - row.record.fromRowIndex + 1)"
|
"description": "Text transform on cells in column mets:mets - mets:fileSec - mets:fileGrp - mets:file - ID using expression grel:'FILE_' + row.record.cells['id'].value[0].split(':')[-1] + '_' + (row.index - row.record.fromRowIndex + 1)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -57,11 +57,11 @@
|
||||||
"mode": "row-based"
|
"mode": "row-based"
|
||||||
},
|
},
|
||||||
"columnName": "setSpec",
|
"columnName": "setSpec",
|
||||||
"expression": "grel:value.split(':').reverse()[0]",
|
"expression": "grel:value.split(':')[-1]",
|
||||||
"onError": "keep-original",
|
"onError": "keep-original",
|
||||||
"repeat": false,
|
"repeat": false,
|
||||||
"repeatCount": 10,
|
"repeatCount": 10,
|
||||||
"description": "Text transform on cells in column setSpec using expression grel:value.split(':').reverse()[0]"
|
"description": "Text transform on cells in column setSpec using expression grel:value.split(':')[-1]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "core/text-transform",
|
"op": "core/text-transform",
|
||||||
|
|
Loading…
Reference in New Issue