var id = $feature.Inscricao;
var tbl = FeatureSetByName($map,"Cadastro");
var sql = "Inscricao = '" + id + "'";
var related_data = Filter(tbl, sql);
var cnt = Count(related_data);
var result = cnt
if (cnt > 0) {
for (var row in related_data) {
var line =
TextFormatting.Newline +
TextFormatting.Newline + "Setor: " + row.Setor + " / Quadra: " + row.Quadra + " / Lote: " + row.Lote + " / Unidade: " + row.Unidade +
TextFormatting.Newline + "Lançamento: " + row.Lancamento +
TextFormatting.Newline + "Endereço: " + row.Endereco +
TextFormatting.Newline + "Complemento: " + row.Complemento +
TextFormatting.Newline + "Bairro: " + row.Bairro +
TextFormatting.Newline + "Zona: " + row.Zona +
TextFormatting.Newline + "Face de Quadra: " + row.Face +
TextFormatting.Newline + "Testada: " + row.Testada +
TextFormatting.Newline + "Terreno: " + row.ATer +
TextFormatting.Newline + "Construção: " + row.AConstr +
TextFormatting.Newline + "Tipo: " + row.TipoCod +
TextFormatting.Newline + "Padrão: " + row.PadraoCod +
TextFormatting.Newline + "Valores do m2 (PVG 2013)" +
TextFormatting.Newline + "Terreno: R$ " + row.PVG2013M2Terreno +
TextFormatting.Newline + "Construção: R$ " + row.PVG2013M2Construcao +
TextFormatting.Newline;
result += line;
}
} else {
result = "Lote sem dados relacionados:";
}
return result;