This commit is contained in:
Felix Lohmeier 2022-04-29 20:09:40 +02:00
parent 2cc5bfb999
commit 4084a80d5e
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,68 @@
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "M|IDN",
"expression": "isBlank(value)",
"columnName": "M|IDN",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"baseColumnName": "M|IDN",
"expression": "grel:[ forNonBlank(forEach(cells['M|410'].value.split(';'), v, '\u001fp' + v.trim()).join(''), x, x, '') + forNonBlank(forEach(cells['M|412'].value.split(';'), v, '\u001fn' + v.trim()).join(''), x, x, null), forNonBlank(forEach(cells['M|415'].value.split(';'), v, '\u001fp' + v.trim()).join(''), x, x, '') + forNonBlank(forEach(cells['M|417'].value.split(';'), v, '\u001fn' + v.trim()).join(''), x, x, null), forNonBlank(forEach(cells['M|418'].value.split('␟'), v, forEach(filter(v.split('\u001f'), f, 'agh'.contains(f[0])), sub, '\u001f' + sub[0].replace('a','p').replace('g','n') + sub.slice(1)).join('')).join('␟'), x, x, null), forNonBlank(forEach(cells['M|419'].value.split('␟'), v, forEach(filter(v.split('\u001f'), f, 'ab'.contains(f[0])), sub, if(sub[0] == 'a', forEach(sub.slice(1).split(';'), a, '\u001fp' + a.trim()).join(''), '\u001fn' + sub.slice(1) )).join('')).join('␟'), x, x, null) ].join('␟')",
"onError": "set-to-blank",
"newColumnName": "4030",
"columnInsertIndex": 3,
"description": "Create column 4030"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "4030",
"expression": "isBlank(value)",
"columnName": "4030",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "4030",
"expression": "grel:forEach(value.split('␟'), v, if(v[0,2] != '\u001fp', '\u001fp[Erscheinungsort nicht ermittelbar]' + v, v)).join('␟')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 4030"
}
]

View File

@ -21,6 +21,7 @@ if(row.index - row.record.fromRowIndex == 0,
+ forNonBlank(cells['3110'].value, v, forEach(v.split('␟'), x, '029F ' + x + '\n').join(''), '') + forNonBlank(cells['3110'].value, v, forEach(v.split('␟'), x, '029F ' + x + '\n').join(''), '')
+ forNonBlank(cells['4020'].value, v, '032@ ' + 'a' + v + '\n', '') + forNonBlank(cells['4020'].value, v, '032@ ' + 'a' + v + '\n', '')
+ forNonBlank(cells['4026'].value, v, '035E ' + 'a' + v + '\n', '') + forNonBlank(cells['4026'].value, v, '035E ' + 'a' + v + '\n', '')
+ forNonBlank(cells['4030'].value, v, forEach(v.split('␟'), x, '033A ' + x + '\n').join(''), '')
+ forNonBlank(cells['4222'].value, v, '046M ' + 'a' + v + '\n', '') + forNonBlank(cells['4222'].value, v, '046M ' + 'a' + v + '\n', '')
,'') ,'')
}}{{ }}{{