This commit is contained in:
Felix Lohmeier 2022-03-30 21:27:11 +02:00
parent 4cde132f8e
commit 43cf7a8087
2 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,166 @@
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "M|IDN",
"expression": "grel:filter(cells['M|303'].value.split('\u001f'), v, v.startsWith('t'))[0].slice(1)",
"onError": "set-to-blank",
"newColumnName": "3210",
"columnInsertIndex": 3,
"description": "Create column 3210"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3210",
"expression": "isBlank(value)",
"columnName": "3210",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3210",
"expression": "grel:value + forNonBlank(filter(cells['M|303'].value.split('\u001f'), v, v.startsWith('u'))[0].slice(1), x, '\u001fp' + x, '')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3210 using expression grel:value + forNonBlank(filter(cells['M|303'].value.split('\u001f'), v, v.startsWith('u'))[0].slice(1), x, '\u001fp' + x, '')"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3210",
"expression": "isBlank(value)",
"columnName": "3210",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": true,
"l": "true"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "M|304",
"expression": "isBlank(value)",
"columnName": "M|304",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3210",
"expression": "grel:cells['M|304'].value",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3210 using expression grel:cells['M|304'].value"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3210",
"expression": "isBlank(value)",
"columnName": "3210",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3210",
"expression": "grel:value.replace('¬', '')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3210 using expression grel:value.replace('¬', '')"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3210",
"expression": "isBlank(value)",
"columnName": "3210",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3210",
"expression": "grel:with(['a', 'das', 'dem', 'den', 'der', 'des', 'die', 'ein', 'eine', 'einem', 'einen', 'einer', 'eines', 'the'], x, if(inArray(x, value.split(' ')[0].toLowercase()), value.split(' ')[0] + ' @' + value.split(' ').slice(1).join(' '), value))",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3210"
}
]

View File

@ -9,6 +9,7 @@ if(row.index - row.record.fromRowIndex == 0,
+ forNonBlank(cells['1131'].value, v, forEach(v.split('␟'),x,'013D ' + '' + x + '\n').join(''), '') + forNonBlank(cells['1131'].value, v, forEach(v.split('␟'),x,'013D ' + '' + x + '\n').join(''), '')
+ forNonBlank(cells['1140'].value, v, '013H ' + 'a' + v + '\n', '') + forNonBlank(cells['1140'].value, v, '013H ' + 'a' + v + '\n', '')
+ forNonBlank(cells['1700'].value, v, '019@ ' + forEach(v.split('‡'),x,'a' + x).join('') + '\n', '') + forNonBlank(cells['1700'].value, v, '019@ ' + forEach(v.split('‡'),x,'a' + x).join('') + '\n', '')
+ forNonBlank(cells['3210'].value, v, '022A/00 ' + 'a' + v + '\n', '')
+ forNonBlank(cells['3000'].value, v, '028A ' + v + '\n', '') + forNonBlank(cells['3000'].value, v, '028A ' + v + '\n', '')
+ forNonBlank(cells['3010'].value, v, forEach(v.split('␟'), x, '028C ' + x + '\n').join(''), '') + forNonBlank(cells['3010'].value, v, forEach(v.split('␟'), x, '028C ' + x + '\n').join(''), '')
+ forNonBlank(cells['3100'].value, v, '029A ' + v + '\n', '') + forNonBlank(cells['3100'].value, v, '029A ' + v + '\n', '')