Errors from link record query

Hello,

We want 'Retired' CIs to not be visible for selection when creating new Change records, so I added a line to the CM3R link record for affected.item (line 3 in the code below) to filter out 'Retired' CIs unless in the Closure phase:

---

if ($fill.skip.master=true) then ($fill.skip=true;cleanup($fill.skip.master))

$query="device.type=\"bizservice\""

if (not (current.phase in $File="Closure")) then $query =" and iStatus~=\"Retired/Consumed\""

if (not (null(affected.item in $File))) then $query =(" and logical.name#\"" affected.item in $File "\"")

---

When I open a new Change ticket and attempt to fill or find on a partial string in the Service field (affected.item) I get two error messages:

1) Cannot select records from link file; probable bad query: device.type="bizservice" and iStatus~="Retired/Consumed" and logical.name#"Backup Services"

2) Query field (iStatus) in (device) not defined in dbdict (us.link,select.records)

The second error is actually given twice.

I have confirmed that 'iStatus' is indeed defined in the dbdict record for the device table.

What am I missing here?

Thanks,

Jeremy Newell

  • Verified Answer

    Hello Jeremy,

    field name is lowercase, istatus, not iStatus.
    it works with lowercase in my SM OOB,
    1) device.type="bizservice" and iStatus~="Retired/Consumed" and logical.name#"Backup Services"
    -> Query field (iStatus) in (device) not defined in dbdict (se.search.engine,select.records)

    2) device.type="bizservice" and istatus~="Retired/Consumed" and logical.name#"Backup Services"
    -> works, no record found


    Regards,
    Eric