Trying to pass the query by reference but does not seems to work, In the second call the query is being reseted to blank
Please advise
Trying to pass the query by reference but does not seems to work, In the second call the query is being reseted to blank
Please advise
Without code and how it is being called this would be like asking u s to find the needle in the hay stack.
rc.TaskDetail = {};
rc.TaskDetail.taskID = 0;
var rc.ParticipantTasks = queryNew(“taskID,taskName,relativeID,relativeDescriptor,dueDate,completionDate,userSignDate,adminSignDate,admin,statusID,status,userFeedback,adminFeedback,futureFlag,lastRepeatFlag”);
newRow = QueryAddRow(rc.ParticipantTasks , 1);
var TMTasks = RunEvent(event=“ehTask.taskForBody”,eventArguments={bodyID = rc.locFilters.participantID,taskType = 1});
for (var h = 1;h lte ArrayLen(TMTasks);h++) {
var locTaskID = TMTasks[h].taskID;
var locDueDate = TMTasks[h].DueDate;
if (locTaskID != rc.locTaskDetail.taskID){
lock timeout=“10” name=“det1_#locTaskID#” {
RunEvent(event=“ehResource.dspTaskRule”,eventArguments={bodyID= 2});
}
//“session.teask_detail_#locTaskID#” = rc.loctaskDetail;
lock timeout=“10” name=“det2_#locTaskID#” {
RunEvent(event=“ehResource.dspListOfTasksForParticipant”,eventArguments={bodyID = rc.locFilters.participantID,relativeID = 0,dueDate = locDueDate});
}
}
}
var TMRelativeTasks = runEvent(event=“ehTask.dspRelativeTask”,eventArguments={relativeID = rc.locFilters.participantID});
and here as soon as run this rc.ParticipantTasks is blank
var newRow = QueryAddRow(rc.ParticipantTasks);
temp = QuerySetCell(rc.ParticipantTasks, “bodyID”, arguments.bodyID);
Try adding
var rc = event.getCollection();
To your dspListOfTasksForParticipant function
Curt
just did still the same problem
is when I execute
var TMRelativeTasks = runEvent(event=“ehTask.dspRelativeTask”,eventArguments={relativeID = rc.locFilters.participantID});
the query get reset back to nothing
Ah, think I found it.
Remove the var from this line.
var rc.ParticipantTasks = queryNew(“taskID,taskName,relativeID,relativeDescriptor,dueDate,completionDate,userSignDate,adminSignDate,admin,statusID,status,userFeedback,adminFeedback,futureFlag,lastRepeatFlag”);
Just did still the same
Did you reinit?
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
of course
Also right after the first loop I drop the line to get the current status of my query
rc.locParticipantTasks2 = rc.locParticipantTasks;
and could not find locParticipantTasks2in the rc.