From 570fa2ad872d176cdaeeef7a618fbbdaf86a033f Mon Sep 17 00:00:00 2001
From: Maria Hofmann <m.hofmann@adito.de>
Date: Mon, 17 Jun 2019 12:50:23 +0200
Subject: [PATCH] Keyword DSGVOTablename and more

---
 .../basic/2019.1.4/DSGVO/create_DSGVO.xml     |  2 +-
 .../DSGVO/init_dsgvotablename_keyword.xml     | 41 ++++++++++++++
 .../basic/2019.1.4/DSGVO/insert_DSGVO.xml     |  2 +-
 .../Data_alias/basic/2019.1.4/changelog.xml   |  1 +
 aliasDefinition/Data_alias/Data_alias.aod     |  4 +-
 entity/DSGVO_entity/DSGVO_entity.aod          | 55 +++++++++++--------
 .../entityfields/contact_id/valueProcess.js   | 10 ++++
 .../containername_param/valueProcess.js       |  4 ++
 .../tablename/displayValueProcess.js          |  6 ++
 .../recordcontainers/db/conditionProcess.js   | 16 +++---
 .../recordcontainers/db/fromClauseProcess.js  |  6 --
 .../recordcontainers/db/onDBInsert.js         | 43 ---------------
 .../medium.value/expression.js                | 22 --------
 .../right.displayvalue/expression.js          |  2 +-
 .../expression.js                             |  4 +-
 .../use.displayvalue/expression.js            |  2 +-
 .../KeywordEntry_entity.aod                   |  6 ++
 neonView/DSGVOEdit_view/DSGVOEdit_view.aod    |  4 +-
 process/KeywordRegistry_basic/process.js      |  4 +-
 19 files changed, 120 insertions(+), 114 deletions(-)
 create mode 100644 .liquibase/Data_alias/basic/2019.1.4/DSGVO/init_dsgvotablename_keyword.xml
 create mode 100644 entity/DSGVO_entity/entityfields/keywordtablename/children/containername_param/valueProcess.js
 create mode 100644 entity/DSGVO_entity/entityfields/tablename/displayValueProcess.js
 delete mode 100644 entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js
 delete mode 100644 entity/DSGVO_entity/recordcontainers/db/onDBInsert.js
 delete mode 100644 entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js
 rename entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/{medium.displayvalue => tablename.displayvalue}/expression.js (65%)

diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml
index f28453e4b0..355ade6529 100644
--- a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml
+++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml
@@ -20,7 +20,7 @@
             <column name="RIGHT" type="CHAR(36)" />
             <column name="USE" type="CHAR(36)" />
             
-            <column name="TABLENAME" type="NVARCHAR(30)" />
+            <column name="TABLENAME" type="CHAR(36)" />
             <column name="VALID_TO" type="TIMESTAMP" />
             
             <column name="CONTACT_ID" type="CHAR(36)">
diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/init_dsgvotablename_keyword.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/init_dsgvotablename_keyword.xml
new file mode 100644
index 0000000000..0782f8b1b5
--- /dev/null
+++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/init_dsgvotablename_keyword.xml
@@ -0,0 +1,41 @@
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
+    <changeSet author="m.hofmann" id="e6b32d7d-298c-44a3-901f-88baa77cb6c3">
+        <insert tableName="AB_KEYWORD_ENTRY">
+            <column name="AB_KEYWORD_ENTRYID" value="3ae54e09-7ad1-462e-a908-a7ccfbdebd91"/>
+            <column name="KEYID" value="c9032b73-63ec-4a22-aff6-317ec3a4dbf6"/>
+            <column name="TITLE" value="Adressen"/>
+            <column name="CONTAINER" value="DSGVOTablename"/>
+            <column name="SORTING" valueNumeric="0"/>
+            <column name="ISACTIVE" valueNumeric="1"/>
+            <column name="ISESSENTIAL" valueNumeric="0"/>
+        </insert>
+        <insert tableName="AB_KEYWORD_ENTRY">
+            <column name="AB_KEYWORD_ENTRYID" value="d4583f1b-787e-4890-ab65-df53ca3e1153"/>
+            <column name="KEYID" value="0a4c61e6-3b60-441f-8b30-ee6a61c4e92e"/>
+            <column name="TITLE" value="Kommunikationsdaten"/>
+            <column name="CONTAINER" value="DSGVOTablename"/>
+            <column name="SORTING" valueNumeric="1"/>
+            <column name="ISACTIVE" valueNumeric="1"/>
+            <column name="ISESSENTIAL" valueNumeric="0"/>
+        </insert>
+        <insert tableName="AB_KEYWORD_ENTRY">
+            <column name="AB_KEYWORD_ENTRYID" value="012270f0-b975-489d-883b-b38317390228"/>
+            <column name="KEYID" value="5fe90cba-c5f1-43f4-a213-895c201d02ea"/>
+            <column name="TITLE" value="Attribute"/>
+            <column name="CONTAINER" value="DSGVOTablename"/>
+            <column name="SORTING" valueNumeric="2"/>
+            <column name="ISACTIVE" valueNumeric="1"/>
+            <column name="ISESSENTIAL" valueNumeric="0"/>
+        </insert>
+        <insert tableName="AB_KEYWORD_ENTRY">
+            <column name="AB_KEYWORD_ENTRYID" value="16fc2669-8052-4d3b-8ed2-a670a1e9f5b0"/>
+            <column name="KEYID" value="265ffe4b-0f5f-45e1-9d8a-8c3ab4aac8f1"/>
+            <column name="TITLE" value="Persönliche Daten"/>
+            <column name="CONTAINER" value="DSGVOTablename"/>
+            <column name="SORTING" valueNumeric="3"/>
+            <column name="ISACTIVE" valueNumeric="1"/>
+            <column name="ISESSENTIAL" valueNumeric="0"/>
+        </insert>
+    </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml
index 518da7b2af..1cad44437f 100644
--- a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml
+++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml
@@ -10,7 +10,7 @@
             <column name="ROW_ID" value="73d73404-e7f5-11e8-9f32-f2801f1b9fd1"/>
             <column name="RIGHT" value="b3f7038b-622b-45e4-8c5c-4b0c7aed6300"/>
             <column name="USE" value="56762dd8-cfe8-4551-a758-0fd0fa4f7e76"/>
-            <column name="TABLENAME" value="ADDRESS"/>
+            <column name="TABLENAME" value="c9032b73-63ec-4a22-aff6-317ec3a4dbf6"/>
             <column name="VALID_TO" value="2019-10-10 06:57:51.882"/>
             <column name="CONTACT_ID" value="7c1efe4c-cc73-4e95-bdf0-208a3ff699b5"/>
         </insert>
diff --git a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml
index bc9bd66b9e..308ef67818 100644
--- a/.liquibase/Data_alias/basic/2019.1.4/changelog.xml
+++ b/.liquibase/Data_alias/basic/2019.1.4/changelog.xml
@@ -200,4 +200,5 @@
     <include relativeToChangelogFile="true" file="DSGVO/insert_DSGVO.xml"/>
     <include relativeToChangelogFile="true" file="DSGVO/init_dsgvoright_keyword.xml"/>
     <include relativeToChangelogFile="true" file="DSGVO/init_dsgvouse_keyword.xml"/>
+    <include relativeToChangelogFile="true" file="DSGVO/init_dsgvotablename_keyword.xml"/>
 </databaseChangeLog>
diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod
index 3d1bf4244e..7632f8bf0a 100644
--- a/aliasDefinition/Data_alias/Data_alias.aod
+++ b/aliasDefinition/Data_alias/Data_alias.aod
@@ -9772,8 +9772,8 @@
                 <name>TABLENAME</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="30" />
+                <columnType v="1" />
+                <size v="36" />
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod
index 22df5e3bc8..25fc59db25 100644
--- a/entity/DSGVO_entity/DSGVO_entity.aod
+++ b/entity/DSGVO_entity/DSGVO_entity.aod
@@ -62,6 +62,11 @@
     </entityField>
     <entityField>
       <name>TABLENAME</name>
+      <title>Source</title>
+      <consumer>KeywordTablename</consumer>
+      <groupable v="true" />
+      <mandatory v="true" />
+      <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/tablename/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
       <name>VALID_TO</name>
@@ -170,23 +175,33 @@
       <name>VALUE</name>
       <title>Value</title>
     </entityField>
+    <entityConsumer>
+      <name>KeywordTablename</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>KeywordEntry_entity</entityName>
+        <fieldName>SpecificContainerKeywords</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ContainerName_param</name>
+          <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/keywordtablename/children/containername_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
       <name>db</name>
       <alias>Data_alias</alias>
       <maximumDbRows v="0" />
-      <isPageable v="true" />
-      <isRequireContainerFiltering v="false" />
-      <fromClauseProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess>
       <conditionProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
-      <onDBInsert>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
       <linkInformation>
         <linkInformation>
-          <name>32dd6b4a-8fd0-48ed-b39a-b1bd222b7e88</name>
+          <name>57e92e2b-66c8-45f8-a9e9-b6e099dd41ba</name>
           <tableName>DSGVO</tableName>
           <primaryKey>DSGVOID</primaryKey>
-          <isUIDTable v="false" />
+          <isUIDTable v="true" />
           <readonly v="false" />
         </linkInformation>
       </linkInformation>
@@ -211,6 +226,10 @@
           <name>RIGHT.value</name>
           <recordfield>DSGVO.RIGHT</recordfield>
         </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>RIGHT.displayValue</name>
+          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>ROW_ID.value</name>
           <recordfield>DSGVO.ROW_ID</recordfield>
@@ -223,6 +242,10 @@
           <name>USE.value</name>
           <recordfield>DSGVO.USE</recordfield>
         </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>USE.displayValue</name>
+          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>USER_EDIT.value</name>
           <recordfield>DSGVO.USER_EDIT</recordfield>
@@ -236,24 +259,8 @@
           <recordfield>DSGVO.VALID_TO</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
-          <name>RIGHT.displayValue</name>
-          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>USE.displayValue</name>
-          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>validToFormat.value</name>
-          <recordfield>DSGVO.VALID_TO</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>MEDIUM.displayValue</name>
-          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js</expression>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>MEDIUM.value</name>
-          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js</expression>
+          <name>TABLENAME.displayValue</name>
+          <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/tablename.displayvalue/expression.js</expression>
         </dbRecordFieldMapping>
       </recordFieldMappings>
     </dbRecordContainer>
diff --git a/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js b/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js
index e69de29bb2..da94b8c30f 100644
--- a/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js
+++ b/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js
@@ -0,0 +1,10 @@
+import("system.result");
+import("system.neon");
+import("system.vars");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
+{
+    if(vars.exists("$param.currentPerson_param") && vars.get("$param.currentPerson_param") != null) {
+        result.string(vars.getString("$param.currentPerson_param"));    
+    }
+}
\ No newline at end of file
diff --git a/entity/DSGVO_entity/entityfields/keywordtablename/children/containername_param/valueProcess.js b/entity/DSGVO_entity/entityfields/keywordtablename/children/containername_param/valueProcess.js
new file mode 100644
index 0000000000..f34054e29b
--- /dev/null
+++ b/entity/DSGVO_entity/entityfields/keywordtablename/children/containername_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("KeywordRegistry_basic");
+
+result.string($KeywordRegistry.DSGVOTablename());
\ No newline at end of file
diff --git a/entity/DSGVO_entity/entityfields/tablename/displayValueProcess.js b/entity/DSGVO_entity/entityfields/tablename/displayValueProcess.js
new file mode 100644
index 0000000000..80e574ee4a
--- /dev/null
+++ b/entity/DSGVO_entity/entityfields/tablename/displayValueProcess.js
@@ -0,0 +1,6 @@
+import("system.result");
+import("system.vars");
+import("KeywordRegistry_basic");
+import("Keyword_lib");
+
+result.string(KeywordUtils.getViewValue($KeywordRegistry.DSGVOTablename(), vars.get("$field.TABLENAME")));
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js b/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js
index 9528a09d79..e35a5d6c72 100644
--- a/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js
+++ b/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js
@@ -1,8 +1,8 @@
-//import("system.db");
-//import("system.result");
-//import("Sql_lib");
-//
-//var cond = new SqlCondition();
-//cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param");
-///* TODO: use a preparedCondition when available*/
-//result.string(db.translateCondition(cond.build("1 = 2")));
\ No newline at end of file
+import("system.db");
+import("system.result");
+import("Sql_lib");
+
+var cond = new SqlCondition();
+cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param");
+/* TODO: use a preparedCondition when available*/
+result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js b/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js
deleted file mode 100644
index a502cdaff4..0000000000
--- a/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-//import("system.result");
-//
-//result.string("DSGVO "
-//                + "join CONTACT on DSGVO.CONTACT_ID = CONTACT.CONTACTID ");
-/*                + "join COMMUNICATION on DSGVO.ROW_ID = COMMUNICATION.COMMUNICATIONID "
-                + "join ADDRESS on DSGVO.ROW_ID = ADDRESS.ADDRESSID");*/
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js b/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js
deleted file mode 100644
index bd9bf3dd16..0000000000
--- a/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js
+++ /dev/null
@@ -1,43 +0,0 @@
-//import("KeywordRegistry_basic");
-//import("Keyword_lib");
-//import("system.db");
-//import("system.neon");
-//import("system.vars");
-//import("system.util");
-//
-//
-//if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
-//{
-//    var cols = ["USER_NEW" , "USER_EDIT" , "DSGVOID" , "ROW_ID" , "DATE_NEW" , 
-//        "TABLENAME" , "DATE_EDIT" , "RIGHT" , "VALID_TO" , "CONTACT_ID" , "USE"];
-//    
-//    var vals = [vars.get("$sys.user"), null, util.getNewUUID(), 
-//        vars.get("$field.ROW_ID"), vars.get("$sys.date"), vars.get("$field.TABLENAME"),
-//        null,  KeywordUtils. vars.get("$field.RIGHT").valueOf(), vars.get("$field.VALID_TO"), 
-//        vars.get("$field.CONTACT_ID"), vars.get("$field.USE").valueOf()];
-//    // KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE");
-//    db.insertData("DSGVO", cols, null, vals);
-//}
-    // TODO Eintrag in DSGVO Tabelle
-    
-    /*
-     * 
-     var InputMapping = {
-        "OFFERITEM": {
-            condition: "OFFER_ID = '" + pSourceOfferId + "' order by ITEMSORT",
-            ValueMapping: {
-                "OFFER_ID" : pTargetOfferId
-            }
-        }
-    };
-    CopyModuleUtils.copyModule(InputMapping);
-    
-    var oiUtils = new OfferItemUtils(pTargetOfferId);
-    
-    //update order price
-    cols = ["NET", "VAT"];
-    var vals = oiUtils.getNetAndVat();
-    
-    db.updateData("OFFER", cols, null, vals, SqlCondition.equals("OFFER.OFFERID", pTargetOfferId, "1 = 2"));
-     * 
-     */
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js
deleted file mode 100644
index d807c25346..0000000000
--- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import("system.result");
-import("Sql_lib");
-import("system.db");
-import("KeywordRegistry_basic");
-import("Keyword_lib");
-import("system.vars");
-
-var res;
-var table = vars.get("$field.TABLENAME");
-if(table == "COMMUNICATION")
-    {
-        sql = db.cell(SqlCondition.begin().andPrepare(table +  "ID", vars.getString("$field.ROW_ID"))
-            .andPrepare("1=2")
-            .buildSql("select MEDIUM_ID from " + table, "1=2"));
-        res = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), sql); 
-    }
-else if(table == "ADDRESS")
-    res = "ADDRESS";
-else
-    res = "PERSON"
-    
-result.string(res);
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js
index 7bff6895d0..f47fb4e02b 100644
--- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js
+++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js
@@ -3,4 +3,4 @@ import("Keyword_lib");
 import("KeywordRegistry_basic");
 
 var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVORight(), "DSGVO.RIGHT");
-result.string(sql);
+result.string(sql);
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/tablename.displayvalue/expression.js
similarity index 65%
rename from entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js
rename to entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/tablename.displayvalue/expression.js
index 1de26b616b..36108b9a99 100644
--- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js
+++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/tablename.displayvalue/expression.js
@@ -2,5 +2,5 @@ import("system.result");
 import("Keyword_lib");
 import("KeywordRegistry_basic");
 
-var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), "DSGVO.ROW_ID"); // TODO prüfen
-result.string(sql);
+var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOTablename(), "DSGVO.TABLENAME");
+result.string(sql);
\ No newline at end of file
diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js
index 4b55075d99..5614878cd8 100644
--- a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js
+++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js
@@ -3,4 +3,4 @@ import("Keyword_lib");
 import("KeywordRegistry_basic");
 
 var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE");
-result.string(sql);
+result.string(sql);
\ No newline at end of file
diff --git a/entity/KeywordEntry_entity/KeywordEntry_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
index 71557b7c58..dd7fdd190d 100644
--- a/entity/KeywordEntry_entity/KeywordEntry_entity.aod
+++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod
@@ -417,6 +417,12 @@
           <fieldName>KeywordRight</fieldName>
           <isConsumer v="false" />
         </entityDependency>
+        <entityDependency>
+          <name>ae2c4712-5513-4c0d-911a-532f50483c76</name>
+          <entityName>DSGVO_entity</entityName>
+          <fieldName>KeywordTablename</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
       </dependencies>
       <children>
         <entityParameter>
diff --git a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod
index f18bd07095..3b501637e6 100644
--- a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod
+++ b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod
@@ -27,8 +27,8 @@
           <entityField>VALID_TO</entityField>
         </entityFieldLink>
         <entityFieldLink>
-          <name>1e2d81f7-d286-42ee-935d-1a2de2c27c72</name>
-          <entityField>MEDIUM</entityField>
+          <name>a646ddb9-59b6-4773-af79-9f159fa5e6c9</name>
+          <entityField>TABLENAME</entityField>
         </entityFieldLink>
         <entityFieldLink>
           <name>732a0a8a-4db3-4ff9-b4a2-c7ab6f2cf144</name>
diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js
index b8419f7c0f..938ee91399 100644
--- a/process/KeywordRegistry_basic/process.js
+++ b/process/KeywordRegistry_basic/process.js
@@ -106,4 +106,6 @@ $KeywordRegistry.permissionCondType = function(){return "PermissionCondType";};
 $KeywordRegistry.permissionAccessType = function(){return "PermissionAccessType";};
 $KeywordRegistry.DSGVOUse = function(){return "DSGVOUse";};
 $KeywordRegistry.DSGVORight = function(){return "DSGVORight";};
-$KeywordRegistry.textPlaceholder = function(){return "textPlaceholder";};$KeywordRegistry.communicationMediumCampaign = function(){return "CommunicationMediumCampaign";};
+$KeywordRegistry.textPlaceholder = function(){return "textPlaceholder";};
+$KeywordRegistry.communicationMediumCampaign = function(){return "CommunicationMediumCampaign";};
+$KeywordRegistry.DSGVOTablename = function() {return "DSGVOTablename";};
-- 
GitLab