The CreatorCon Call for Content is officially open! Get started here.

Database View and Where Clause calling Script Include

tobrien
Kilo Guru

Hi,

I thought I understood the couple of examples provided in the community to use an Include Script in the Where clause .. pls see below.

In this very simple example, the expectation is that the script will return a serial number which is then used to against the table to return the one matching record.

Screen Shot 2016-09-20 at 2.31.07 PM.png

This is the Include Script (which, has been dumbed down)

Screen Shot 2016-09-20 at 2.31.21 PM.png

This all fails miserably :<

Can anyone explain why it fails?

And, assuming I can get this notion working, the next question would be do I need to create a unique Include Script for every case where I want to use one? I.e. I can't bundle up a bunch of 'functions' within TOBIncludeScripts() and call them like so ==>

a_serial_number = javascript.TOBIncludeScripts().someOtherFunction()

Thanks in advance!

tony

5 REPLIES 5

Hi Brad,



I have a similar question related to database view.



My goal is to pull a report where 'cmdb_ci_computer'   has status -   installed and cmdb_sam_sw_install is empty.



here 'cmdb_sam_sw_install' is the related list under 'cmdb_ci_computer'



Thanks in Advance