This commit is contained in:
Andrey Cunha
2026-05-11 21:54:49 -03:00
parent ba5d7dae57
commit a71f963e37
17 changed files with 3091 additions and 4186 deletions
+10 -15
View File
@@ -64,28 +64,23 @@ function createDataset(fields, constraints, sortFields) {
return dataset;
}
// Criação das colunas
function criarEstrutura(dataset) {
dataset.addColumn("STATUS", DatasetFieldType.STRING);
dataset.addColumn("RETORNO", DatasetFieldType.STRING);
dataset.addColumn("STATUS");
dataset.addColumn("RETORNO");
}
// Função para buscar parâmetro nas constraints
function getParametro(constraints, campo) {
var valor = "";
if (constraints && constraints.length > 0) {
for each (var c in constraints) {
if (c.getFieldName().trim().toUpperCase() === campo.trim().toUpperCase()) {
valor = c.getInitialValue();
break;
}
if (!constraints) return "";
var campoUpper = String(campo || "").trim().toUpperCase();
for (var i = 0; i < constraints.length; i++) {
var c = constraints[i];
if (String(c.fieldName || "").trim().toUpperCase() === campoUpper) {
return String(c.initialValue || "");
}
}
return valor;
return "";
}
// Trim com segurança
function trim(valor) {
if (!valor) return "";
return valor.trim();
return String(valor == null ? "" : valor).trim();
}