Hi Sir, can you help me with appending of data from related layer to the main layer with arcade code.
I have two data one is the Inspection Points and other is the attachment layer both. The attachment layer is related to the Inspection points. So for eg in one Inspection point there may be 5 or 4 attachment points.
I just wan to get the attachment data into the Inspection points based on the global id. I am trying my best.
I have a gdb and in the calculate field I am adding the expression:
var tbl = FeatureSetByName($datastore,"Attachment_Collection");
var codigo = $feature["GlobalID"];
var sql = "GlobalID = '" + codigo + "'";
Console(sql);
var mantenimientos = Filter(tbl, sql);
var cnt = Count(mantenimientos);
var historia = "";
if (cnt > 0) {
historia = cnt + " Mantenimiento(s):";
for (var mantenimiento in mantenimientos) {
var txt_fecha = Text(mantenimiento.Feature_Height);
var txt_man = txt_fecha + mantenimiento.Attachment_Type;
historia += TextFormatting.NewLine + txt_man;
}
} else {
historia = "No hay mantenimientos";
}
return historia;
It will be a pleasure to hear from you.
Thanks in advance