|
@@ -929,7 +929,22 @@ function onDatabaseUpload(config){
|
|
|
//figure out the participantId
|
|
|
|
|
|
let qconfig=new Object();
|
|
|
- qconfig.queryName=config.queryMap[config.registrationQueryId];
|
|
|
+
|
|
|
+ qconfig.schemaName="lists";
|
|
|
+ qconfig.queryName="Forms";
|
|
|
+ qconfig.filterArray=[LABKEY.Filter.create('Key',config.formId)];
|
|
|
+
|
|
|
+ //qconfig.filterArray=[LABKEY.Filter.create('formStatus',1)]
|
|
|
+ qconfig.success=function(data){afterForms(config,configUpload,data)};
|
|
|
+ LABKEY.Query.selectRows(qconfig);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function afterForms(config,configUpload,data){
|
|
|
+ let formEntry=data.rows[0];
|
|
|
+ configUpload.registrationQueryId=formEntry["masterQuery"];
|
|
|
+ let qconfig=new Object();
|
|
|
+ qconfig.queryName=config.queryMap[configUpload.registrationQueryId];
|
|
|
//queryMap holds mapping for queries in visit;
|
|
|
//masterQuery should be one of them, so this is safe.
|
|
|
qconfig.schemaName='lists';
|