import("system.result"); import("system.vars"); import("system.neon"); import("Attribute_lib"); var state = neon.COMPONENTSTATE_DISABLED; if (vars.exists("$local.rows")) { var row = JSON.parse(vars.get("$local.rows"))[0]; if (row.AB_ATTRIBUTE_ID) state = neon.COMPONENTSTATE_EDITABLE; } result.string(state);