From b6222f7e11bf878beb6c4df7a6555ccfa74b114b Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Sat, 30 Apr 2022 18:38:49 +0200 Subject: [PATCH] 4212 --- alephino/config/main/T_4212.json | 35 +++++++++++++++++++++++++++++++ alephino/config/main/template.txt | 1 + 2 files changed, 36 insertions(+) create mode 100644 alephino/config/main/T_4212.json diff --git a/alephino/config/main/T_4212.json b/alephino/config/main/T_4212.json new file mode 100644 index 0000000..9b86c5a --- /dev/null +++ b/alephino/config/main/T_4212.json @@ -0,0 +1,35 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "M|505", + "expression": "isBlank(value)", + "columnName": "M|505", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + } + ], + "mode": "row-based" + }, + "baseColumnName": "M|505", + "expression": "grel:forNonBlank(filter(value.split('\u001f'), f, f[0] == 'p')[0].slice(1), x, '\u001fi' + x, '\u001fiAbweichender Titel') + forNonBlank(filter(value.split('\u001f'), f, f[0] == 'a')[0].slice(1), x, '\u001fa' + with(['a', 'das', 'dem', 'den', 'der', 'des', 'die', 'ein', 'eine', 'einem', 'einen', 'einer', 'eines', 'the'], y, if(inArray(y, x.split(' ')[0].toLowercase()), x.split(' ')[0] + ' @' + x.split(' ').slice(1).join(' '), x)), '')", + "onError": "set-to-blank", + "newColumnName": "4212", + "columnInsertIndex": 3, + "description": "Create column 4212" + } +] diff --git a/alephino/config/main/template.txt b/alephino/config/main/template.txt index 5c4a7c0..c974109 100644 --- a/alephino/config/main/template.txt +++ b/alephino/config/main/template.txt @@ -28,6 +28,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['4063'].value, v, '034K ' + '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['4212'].value, v, '046C ' + v + '\n', '') + forNonBlank(cells['4222'].value, v, '046M ' + 'a' + v + '\n', '') ,'') }}{{