visitDates = Signing[(Run_Number is not null)].distinct(Run_Number);
for each dt in visitDates
{
code = "";
for each r in Signing [(((Run_Number == dt && Post_Code != "") && (Post_Code is not null)) && Job_Status != "Completed")] sort by Time_of_Visit
{
code = code + ":to:" + r.Post_Code;
}
for each r in Signing [(Run_Number == dt && Job_Status != "Completed")] sort by Time_of_Visit
{
//r.Map_Location = "www.maps.google.com/maps?q=from:DA8 1HG" + code;
loc = "www.maps.google.com/maps?q=from:DA8 1HG" + code;
r.Map_Location = (("<a href='" + loc + "' target='_blank' >") + loc) + "</a>";
}
}
This code works perfectly apart from one thing.
produce the same google map code because it is using the run_number as its source. what I need is for the code to also reflect the Rep (Nigel or Ben in this case) and only allocate the postal codes they have on their Saturday list.
Hope this makes sense.