diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod index 4fa663250bca6df6a05c342da3881c282e87c1c1..1cfe28c6019782ac295bace24ef002e4a268a69c 100644 --- a/entity/Address_entity/Address_entity.aod +++ b/entity/Address_entity/Address_entity.aod @@ -15,6 +15,7 @@ <mandatory v="true" /> <textInputAllowed v="false" /> <stateProcess>%aditoprj%/entity/Address_entity/entityfields/address/stateProcess.js</stateProcess> + <titleProcess>%aditoprj%/entity/Address_entity/entityfields/address/titleProcess.js</titleProcess> <tooltip></tooltip> <onValueChange>%aditoprj%/entity/Address_entity/entityfields/address/onValueChange.js</onValueChange> <onValueChangeTypes> diff --git a/entity/Address_entity/entityfields/address/titleProcess.js b/entity/Address_entity/entityfields/address/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ad0fa3728f7bedc3ab9024fd4ef0eddd9195e6f0 --- /dev/null +++ b/entity/Address_entity/entityfields/address/titleProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("system.vars"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); + +var key = vars.get("$field.ADDR_TYPE"); +if (key == $KeywordRegistry.addressType$post()) +{ + result.string("Post office box number"); +} diff --git a/entity/Address_entity/entityfields/buildingno/stateProcess.js b/entity/Address_entity/entityfields/buildingno/stateProcess.js index ed5e161dcc793ca6dc3a379eea6d6b3445eb3b3c..433311c2893f6328bab6780c878efe20064f989c 100644 --- a/entity/Address_entity/entityfields/buildingno/stateProcess.js +++ b/entity/Address_entity/entityfields/buildingno/stateProcess.js @@ -1,10 +1,12 @@ +import("KeywordRegistry_basic"); import("system.neon"); import("system.result"); import("system.vars"); +var key = vars.get("$field.ADDR_TYPE"); // The field is only displayed in edit mode because there is the "formattedAddress" field which one shows the fromated address. // If the field has a Value it would be displayed next to the formattedAddress field in view mode, so in this case the state is set to invisible. -if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW) +if (vars.get("$sys.recordstate") == "" || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW || key == $KeywordRegistry.addressType$post()) { result.string(neon.COMPONENTSTATE_INVISIBLE); } \ No newline at end of file