Where is this Report module variable declared?

In the reporting module (SM 9.41) on the screen you can edit a report, there is a query box where a user can build a query.  If on the permissions tab, the audience is set to "everyone" then the only people able to edit that query field are sysadmins.  I want to make it so that a small select group of users can edit the query field when the audience is set to
"everyone".  When I go to the format inbox.report.chart and go into design mode and select the query field, the read-only condition is set to [$report.can.edit.query]=false

I can't find where that is set.  I know I can probably work around that but I prefer not to unless I can tell where it's originally being set.  Usually if there is a condition like that on a form field, then it's set in the format control or in a ruleset. But as far as I can tell, there is no format control for reports nor is there a workflow.

I have used *afind.string to search the formatctrl table, the RuleSet table and I get no results.  I've also searched secRoles, secRights, userroles, operators, displayoptions, etc.  There are 100s of tables, I don't want to have to do a *afind.string search on each one.

Anyone know where this is initially declared?

  • Verified Answer

    This is all defined in the inbox.init Process.

    In Initial Expressions, there is:

    $report.can.edit.query=$L.can.edit.query

    Earlier on in Inital Expressions, there are several statements that define $L.can.edit.query:

    if ($L.is.inbox.manager=true and same($L.table, "probsummary") and evaluate(query in $G.pm.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "incidents") and evaluate(advanced.search in $G.sm.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "cm3r") and evaluate(query.window in $G.cm3r.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "cm3t") and evaluate(query.window in $G.cm3t.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and (same($L.table, "rootcause") or same($L.table, "rootcausetask") or same($L.table, "knownerror")) and evaluate(advanced.search in $G.rc.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "device") and evaluate(query.window in $G.am.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "contract") and evaluate(query.window in $G.ct.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "ocmq") and evaluate(query.window in $G.ocmq.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "ocml") and evaluate(query.window in $G.ocml.environment)=true) then ($L.can.edit.query=true)
    if ($L.is.inbox.manager=true and same($L.table, "ocmo") and evaluate(query.window in $G.ocmo.environment)=true) then ($L.can.edit.query=true)
    $L.modules.tables={"probsummary", "incidents", "cm3r", "cm3t", "ocmq", "ocml", "ocmo", "rootcause", "rootcausetask", "knownerror", "device", "contract"}

    $L.comment="added from SM940"

    if ($L.is.inbox.manager=false) then ($L.isReportExpert=false;$L.report.canUpdate=false;$L.can.edit.query=false)
    if ($L.report.canUpdate=false and nullsub($is.report, false)=true) then ($L.is.inbox.manager=false;$L.can.edit.query=false;$L.isReportExpert=false;update in $L.env=false)

  • Thank you! I did not think to look in Processes.  This is exactly what I needed.