Skip to content
Snippets Groups Projects
Commit dafd3d02 authored by j.luginger's avatar j.luginger
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1035026][[Person]: Anrede und Titel]

parent ae08e998
No related branches found
No related tags found
No related merge requests found
Showing
with 80 additions and 8 deletions
......@@ -49,12 +49,13 @@
<name>SALUTATION</name>
<title>Salutation</title>
<consumer>Salutations</consumer>
<possibleItemsProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/possibleItemsProcess.js</possibleItemsProcess>
<displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/salutation/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>TITLE</name>
<title>Title</title>
<consumer>SalutationTitles</consumer>
<displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/title/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>TITLESUFFIX</name>
......@@ -551,6 +552,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<entityParameter>
<name>Language_param</name>
<code>%aditoprj%/entity/Person_entity/entityfields/salutations/children/language_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>uIdDefinition_param</name>
......@@ -594,6 +596,14 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>uIdDefinition_param</name>
<code>%aditoprj%/entity/Person_entity/entityfields/salutationtitles/children/uiddefinition_param/code.js</code>
</entityParameter>
<entityParameter>
<name>Salutation_param</name>
<code>%aditoprj%/entity/Person_entity/entityfields/salutationtitles/children/salutation_param/code.js</code>
</entityParameter>
<entityParameter>
<name>Language_param</name>
<code>%aditoprj%/entity/Person_entity/entityfields/salutationtitles/children/language_param/code.js</code>
</entityParameter>
</children>
</entityConsumer>
</entityFields>
......
import("system.db");
import("system.vars");
import("system.neon");
var language = vars.get("$field.LANGUAGE");
var salutation = vars.get("$field.SALUTATION")
var salLanguage = db.cell("select LANGUAGE from SALUTATION where SALUTATION = '" + salutation + "'")
if((vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) && salLanguage != language)
neon.setFieldValue("$field.SALUTATION", "");
\ No newline at end of file
import("system.logging");
import("system.neon");
import("system.vars");
import("system.db");
import("system.result");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
logging.log("kljkk " + vars.get("$field.SALUTATION"))
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$field.LANGUAGE") == "")
result.string("deu");
\ No newline at end of file
import("system.vars");
import("system.db");
import("system.result");
result.string(db.cell("select SALUTATION from PERSON where PERSONID = '" + vars.get("$field.PERSONID") + "'"));
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.result");
......
import("system.logging");
import("system.vars");
import("system.result");
result.string(vars.get("$field.LANGUAGE"))
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.logging")
logging.log("dsfksdjnfksj" + vars.get("$field.ORGANISATION_ID"));
logging.log("ff" + vars.get("$field.SALUTATION"));
result.string(vars.get("$field.SALUTATION"));
\ No newline at end of file
import("system.vars");
import("system.db");
import("system.result");
result.string(db.cell("select TITLE from PERSON where PERSONID = '" + vars.get("$field.PERSONID") + "'"));
\ No newline at end of file
......@@ -4,7 +4,7 @@
<title>Anrede</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<titleProcess>%aditoprj%/entity/Salutation_entity/titleProcess.js</titleProcess>
<recordContainer>db</recordContainer>
<recordContainer>distinctSalutation_jdito</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
......@@ -86,6 +86,7 @@
<entityParameter>
<name>Language_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityProvider>
......@@ -108,6 +109,7 @@
<name>Language_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
......@@ -122,6 +124,13 @@
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>Salutation_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -192,7 +201,14 @@
</jDitoRecordContainer>
<jDitoRecordContainer>
<name>title_jdito</name>
<title>55</title>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/Salutation_entity/recordcontainers/title_jdito/contentProcess.js</contentProcess>
<isPageable v="false" />
<recordFields>
<element>UID.value</element>
<element>UID.displayValue</element>
</recordFields>
</jDitoRecordContainer>
</recordContainers>
</entity>
import("system.logging");
import("system.vars");
import("system.result");
import("system.db");
import("Sql_lib");
logging.log("kkkdjdkdjdf")
var cond = SqlCondition.begin()
.and("SALUTATION is not NULL")
.andPrepareVars("SALUTATION.LANGUAGE", "$param.Language_param")
.buildSql("select distinct SALUTATION, SALUTATION from SALUTATION", "1=2");
var salutation = db.table(cond);
logging.log(salutation)
logging.log(cond)
result.object(salutation);
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.db");
import("Sql_lib");
var cond = SqlCondition.begin()
.and("TITLE is not NULL")
.andPrepareVars("SALUTATION.SALUTATION", "$param.Salutation_param")
.buildSql("select TITLE, TITLE from SALUTATION", "1=2");
var salutation = db.table(cond);
result.object(salutation);
\ No newline at end of file
......@@ -42,6 +42,7 @@
<neonTableColumn>
<name>125d04cc-5c7a-4c38-bd0f-b5d02d21067d</name>
<entityField>SALUTATION</entityField>
<collapse v="false" />
</neonTableColumn>
<neonTableColumn>
<name>2cdfaf73-d3ee-4ad8-83ea-f50acba0335a</name>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment