From 33b229624e45fef7d718aa68412c94124d757a63 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Wed, 30 Mar 2022 23:38:05 +0200 Subject: [PATCH] 4222 --- alephino/config/main/T_4222.json | 41 +++++++++++++++++++++++++++++++ alephino/config/main/template.txt | 1 + 2 files changed, 42 insertions(+) create mode 100644 alephino/config/main/T_4222.json diff --git a/alephino/config/main/T_4222.json b/alephino/config/main/T_4222.json new file mode 100644 index 0000000..b9b7e9e --- /dev/null +++ b/alephino/config/main/T_4222.json @@ -0,0 +1,41 @@ +[ + { + "op": "core/column-addition", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "baseColumnName": "M|361", + "expression": "grel:value.split(' : ')[0] + forNonBlank(value.split(' : ')[1], v, '\u001fd' + v, '')", + "onError": "set-to-blank", + "newColumnName": "4222", + "columnInsertIndex": 3, + "description": "Create column 4222" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "columnName": "4222", + "expression": "grel:value.split(' / ')[0] + forNonBlank(value.split(' / ')[1], v, '\u001fh' + v, '')", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column 4222" + }, + { + "op": "core/text-transform", + "engineConfig": { + "facets": [], + "mode": "row-based" + }, + "columnName": "4222", + "expression": "grel:value.replace('¬', '')", + "onError": "keep-original", + "repeat": false, + "repeatCount": 10, + "description": "Text transform on cells in column 4222" + }, +] diff --git a/alephino/config/main/template.txt b/alephino/config/main/template.txt index 13854ed..0456384 100644 --- a/alephino/config/main/template.txt +++ b/alephino/config/main/template.txt @@ -18,6 +18,7 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['3010'].value, v, forEach(v.split('␟'), x, '028C ' + x + '\n').join(''), '') + forNonBlank(cells['3100'].value, v, '029A ' + v + '\n', '') + forNonBlank(cells['3110'].value, v, forEach(v.split('␟'), x, '029F ' + x + '\n').join(''), '') ++ forNonBlank(cells['4222'].value, v, '046M ' + 'a' + v + '\n', '') ,'') }}{{ if(isNonBlank(cells['E0XXb'].value),