Skip to content
Snippets Groups Projects
stateProcess.js 403 B
Newer Older
import("Sql_lib");
import("system.neon");
import("system.vars");
import("system.result");

var count = new SqlBuilder().selectCount()
                .from("ADVERTISING")
                .where("ADVERTISING.OBJECT_ROWID", vars.get("$field.ACTIVITYID"))
                .cell();
var state = neon.COMPONENTSTATE_INVISIBLE;
if(count == 1)
    state = neon.COMPONENTSTATE_EDITABLE;