diff --git a/entity/ExportTemplateSelection_entity/entityfields/exportcount/valueProcess.js b/entity/ExportTemplateSelection_entity/entityfields/exportcount/valueProcess.js
index e8b2b80fb73dc606d0b452c09a67bd53c5d32d6f..32d6b097f8e521ebb2aaa33aca37964ac69c7f5c 100644
--- a/entity/ExportTemplateSelection_entity/entityfields/exportcount/valueProcess.js
+++ b/entity/ExportTemplateSelection_entity/entityfields/exportcount/valueProcess.js
@@ -2,7 +2,7 @@ import("FilterViewAction_lib");
 import("system.vars");
 import("system.result");
 
-var selection = vars.getString("$field.selection");
+var selection = vars.get("$field.selection");
 
 if(selection)
     result.string(JSON.parse(selection).length);
diff --git a/entity/ExportTemplateSelection_entity/entityfields/selection/valueProcess.js b/entity/ExportTemplateSelection_entity/entityfields/selection/valueProcess.js
index de704ba16782929297cc8bd480cc13fe303f4548..4d89e193e37d0436af60a01739968727fe2bfcd3 100644
--- a/entity/ExportTemplateSelection_entity/entityfields/selection/valueProcess.js
+++ b/entity/ExportTemplateSelection_entity/entityfields/selection/valueProcess.js
@@ -2,14 +2,13 @@ import("FilterViewAction_lib");
 import("system.vars");
 import("system.result");
 
-var selection = JSON.parse(vars.getString("$param.selectedData_param"));
+var contactIds = JSON.parse(vars.getString("$param.selectedData_param"));
 var comingfrom = vars.getString("$param.comingFrom_param");
-var contactIds;
 
 
-if(!Array.isArray(selection)) //if selection is an array, data has been selected
+if(!Array.isArray(contactIds)) //if selection is an array, data has been selected
 {
-    var condition = selection.condition;
+    var condition = contactIds.condition;
     if(comingfrom == "Organisation")
         contactIds = FilterViewActionUtils.organisationIdsFilter(condition);
     else if (comingfrom == "Person")