Hello world,
I could use your help with the following issue: I'm trying to retrieve (string, text) values from a related table and present them in a PopUp (Enterprise 10.9.1, webmap).
I think the issue is a combination of line 2, 10 and 17. Since the code is working on a basic number field. Who can help me out? (Thank you in advanced!)
//Get information from the related table
var relatedtabel = FeatureSetByRelationshipName($feature,"xyz.NAMETabel",["OL_FIRSTNAME","OL_LASTNAME","OL_DATE"]);
var cnt = Count(relatedtabel);
if (cnt > 0) {
console("Found value")
var num = 0; //not sure if this is needed.
var result = "";
var listvalues = [];
var info = (relatedtabel);
for (var num=0; num < cnt; num++) {
console("ascending number: [" + num + "]")
console("total numbers found: [" + cnt + "]")
var relatedinfo = "";
relatedinfo = Text(info.OL_LASTNAME + " | " + Month(info.OL_DATE) + "-" + Year(info.OL_DATE)) + TextFormatting.NewLine;
result += insert(listvalues,num,relatedinfo);
}
return Concatenate([listvalues]);
}
// if there are no related data at all
else {
console("no value found")
var nodata = "";
nodata = Text("Geen informatie");
return nodata
}