This commit is contained in:
Felix Lohmeier 2022-03-30 21:39:34 +02:00
parent 43cf7a8087
commit 3af9635f35
2 changed files with 148 additions and 0 deletions

View File

@ -0,0 +1,147 @@
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "M|IDN",
"expression": "grel:filter(cells['M|303t'].value.split('\u001f'), v, v.startsWith('t'))[0].slice(1)",
"onError": "set-to-blank",
"newColumnName": "3211",
"columnInsertIndex": 3,
"description": "Create column 3211"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3211",
"expression": "isBlank(value)",
"columnName": "3211",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3211",
"expression": "grel:value + forNonBlank(filter(cells['M|303t'].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 3211"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3211",
"expression": "isBlank(value)",
"columnName": "3211",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3211",
"expression": "grel:value + forNonBlank(filter(cells['M|303t'].value.split('\u001f'), v, v.startsWith('f'))[0].slice(1), x, '\u001ff' + x, '')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3211"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3211",
"expression": "isBlank(value)",
"columnName": "3211",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3211",
"expression": "grel:value.replace('¬', '')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column 3211 using expression grel:value.replace('¬', '')"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "3211",
"expression": "isBlank(value)",
"columnName": "3211",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "3211",
"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 3211"
}
]

View File

@ -10,6 +10,7 @@ if(row.index - row.record.fromRowIndex == 0,
+ 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['3210'].value, v, '022A/00 ' + 'a' + v + '\n', '')
+ forNonBlank(cells['3211'].value, v, '022A/01 ' + 'a' + 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['3100'].value, v, '029A ' + v + '\n', '')