Skip to content
Snippets Groups Projects
Commit eccd27be authored by Sophia Leierseder's avatar Sophia Leierseder
Browse files

basics limitation of attachment-lookup

parent 62b115b1
No related branches found
No related tags found
No related merge requests found
......@@ -81,8 +81,18 @@
<name>DocumentId_param</name>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>Type_param</name>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityProvider>
<entityParameter>
<name>Type_param</name>
<expose v="true" />
<triggerRecalculation v="false" />
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("system.result");
if(vars.getString("$field.TYPE") == "ATT"){
result.string("$field.DOCUMENTTEMPLATEID");
}
\ No newline at end of file
......@@ -4,8 +4,10 @@ import("system.result");
import("system.vars");
import("system.db");
//var parenttype = db.cell("select TYPE from DOCUMENTTEMPLATE");
//
//
//if(parenttype == "MAI")
// result.string("DISABLED");
\ No newline at end of file
var parenttype = vars.get("$param.Type_param");
logging.log(parenttype);
if(vars.exists(parenttype) && paraenttype != null && parenttype != "MAI"){
result.object(neon.COMPONENTSTATE_DISABLED);
}
\ No newline at end of file
import("system.logging");
import("system.result");
import("system.vars");
if (vars.exists("$param.DocumentTemplateType_param"))
{
result.string(vars.get("$param.DocumentTemplateType_param"));
}
......@@ -7,4 +7,14 @@ var cond = SqlCondition.begin()
.andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", "$param.DocumentId_param");
//TODO: use a preparedCondition when available #1030812 #1034026
result.string(db.translateCondition(cond.build("1 = 0")));
\ No newline at end of file
result.string(db.translateCondition(cond.build("1 = 0")));
//if(vars.exists("$param.Type_param") && vars.get("$param.Type_param") != null && vars.get("$param.Type_param") == "ATT"){
//
// var cond = SqlCondition.begin()
// .andPrepare("DOCUMENTTEMPLATELINK.ATTACHMENT_TYPE", type)
// .andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", docId)
// .build();
//
// result.string(db.translateCondition(cond));
//}
\ No newline at end of file
......@@ -208,6 +208,14 @@
<entityParameter>
<name>DocumentId_param</name>
<valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/links/children/documentid_param/valueProcess.js</valueProcess>
<expose v="true" />
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>Type_param</name>
<valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/links/children/type_param/valueProcess.js</valueProcess>
<expose v="true" />
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityConsumer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$field.TYPE"));
\ No newline at end of file
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