Hi,
I'm trying to make an image visible or not visible based on a)an event collection and b)an attendance collection that holds the eventID and the UserID.
I have two services, a query service called EventQuery for the colEvents collection and a query service called AttendQuery for the colAttendingEvent collection.
EventQuery Service:
In EventQuery service I assign the EventID to the a localstored variable. In the JavaScript for that mapping I execute the AttendQuery service.
alert("PreExecute");
AttendQuery.execute({});
alert("Executed");
AttendQuery Service:
In the AttendQuery service i have a where clause passing both the EventID and UserID from the localstored variables.
I mapped the response EventID to the image visible property and inserted the javascript below to change the visibility:
var vEventID = localStorage.getItem("EventID");
alert(vEventID);
if (vEventID==null || vEventID=="")
return false;
else
return true;
You'll notice I have alerts in all the javascripts. What I hoped was that the AttendQuery.execute({}); would run for each row as they are presented in the list, instead all the rows are shown first (I see the "PreExecute" and "Execute" alert for each event row) followed by the each AttendQuery alert (in this scenario I see "[EventID]", "[null").
As a consequence all the rows have the image non-visible.
Is there a way I can make the AttendQuery execute for each row or should I be doing this differently?
I have attached screen shots.
You're help is greatly appreciated.
Regards,