CA Service Management

Expand all | Collapse all

Additional Search Arguments properly formatted query

  • 1.  Additional Search Arguments properly formatted query

    Posted May 15, 2014 02:31 PM

    Hello All, I am new to the CA Service Desk environment and I was asked to figure out how to use the "Additional Search Arguments" to compose a query for finding out all incidents where a  specific use added one or more activities.  I am well versed in SQL Statements but I am not familiar how to construct them in the "Additional Search Arguments" field.  I have been reading the CA_SDM_Tech_Ref_ENU.PDF and it gives out the SQL Table references in the SQL Name to Table and Object but no matter how I write the query I keep getting parse errors.  The last thing I tried was:       act_log.analyst LIKE 'negron'   not sure if the clause WHERE is needed or not.  Any help will be greatly appreciated!  Thanks!



  • 2.  RE: Additional Search Arguments properly formatted query

    Broadcom Employee
    Posted May 16, 2014 11:30 AM

    The additional search arguments can be used to query a field that belongs directly to the object you are searching against. For example if you are searching against the "cr" object (associated to "Requests") you can query against any data that is directly located in the "cr" object. In the example you provided you are trying to query against a joined table to the "act_log.analyst", I'm sorry to say that it's not possible to use the "additional search arguments" to query this joined table.

    Additionally you will not need the "where" when you construct the query.



  • 3.  RE: Additional Search Arguments properly formatted query
    Best Answer

    Posted May 19, 2014 11:18 AM

    If you look at the alg object you will see that analyst is an SREL to the id of the cnt object. You query is coded to look for a contact with an id (UUID) of 'negron' which, of course, will not work.

    Assuming that 'negron' is the login ID for the contact in question, your Additional Search Arguments should be:

    act_log.analyst.userid = 'negron'

     



  • 4.  RE: Additional Search Arguments properly formatted query

    Posted May 19, 2014 11:30 AM
    lindsay_estabrooks:

    If you look at the alg object you will see that analyst is an SREL to the id of the cnt object. You query is coded to look for a contact with an id (UUID) of 'negron' which, of course, will not work.

    Assuming that 'negron' is the login ID for the contact in question, your Additional Search Arguments should be:

    act_log.analyst.userid = 'negron'

     

     

    Hello lindsay_estabrooks your query returned exactly what I needed, thank you so much!!!



     



  • 5.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 09:57 AM

    Lindsay, I'm doing something similar, but working with the class of "Windows" and the family of "Hardware.Server".  I want to search for criteria in the "Security Patch Level" field, i.e. security_patch_level, as this is not on the form.  Is there a way for me to do that?



  • 6.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 11:56 AM

    Hi Corb,

     

    When searching for Configuration Items, in the Additional Search Arguments, add the following criteria:

     

    assoc_har_serx.security_patch_level = 'some text value'

     

    Cheers,

    Lindsay



  • 7.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 12:33 PM

    Thanks Lindsay, it worked perfect!  Because this will not be the last time I do this, how do I figure out that first part of the query ‘assoc_har_serx.’?  I see the har_ser  =  Hardware.Server, but how do I figure out that for other families and classes?



  • 8.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 02:28 PM

    Hey Cord,

     

    One way you can do this is by looking at a Configuration Item of an existing Family. Then right-click on the page and one of the pop-up menu items should be "Print Form detail_???_???x.htmpl...". So for Family "Software Application" it should be detail_app_extx.htmpl and for "Hardware.Server" it should be detail_har_serx.htmpl. The app_extx and har_serx are the associated objects.

     

    Cheers,

    Lindsay



  • 9.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 03:59 PM

    Slick.  Thanks!



  • 10.  Re: Additional Search Arguments properly formatted query

    Posted Jun 25, 2015 11:37 AM

     

    Lindsay, as a follow-up - what about detail_dat_basx.htmpl where I’m looking for a match on the attribute “Portfolio”.  Would it be dat_basx.portfolio = ‘<something>’?   I tried, but it is returning an error:

     

    AHD03053:Bad where clause: Parse error at : "delete_flag = 0 AND is_ci = 1 AND family = 300034 AND class = 300117 AND (dat_basx.portfolio='<my serach criteria>')" (Attr not found or not atomic)

     



  • 11.  Re: Additional Search Arguments properly formatted query

    Posted Jun 25, 2015 06:58 PM

    try

     

    assoc_dat_basx.portfolio = '<my search criteria.'



  • 12.  Re: Additional Search Arguments properly formatted query

    Posted Jun 26, 2015 03:13 PM

    Thanks Lindsay, that worked.  Curios as to why the "right-click on the page and one of the pop-up menu items should be "Print Form detail_???_???x.htmpl..." didn't work?  Is there a better way to identify the objects so I can teach people the proper search strings?



  • 13.  Re: Additional Search Arguments properly formatted query

    Posted Jun 27, 2015 12:33 PM

    Another way is to look at the source of the page and search for the variable "propFormName".



  • 14.  Re: Additional Search Arguments properly formatted query

    Posted May 29, 2015 12:21 PM

    Hi Lindsay,

     

    I was hoping you could assist with my question as well. I require to leverage the "Additional Search Arguments" in Search, and what I am looking for is whether the "environment" used in a Change Order is "PROD" or not.

     

    I know you mentioned above that when we open a Configuration Item of an Family and do a right click, we can get the right name and use that in the search arguments. However, in my case, the field "Environment" used in Change Orders is a drop down, and I cannot right click on that to show me the configurations items. In this case, how can I determine the name for "environment"?

     

    Any help would be greatly appreciated. Thank you.


    Faddi



  • 15.  Re: Additional Search Arguments properly formatted query

    Posted Jun 01, 2015 01:23 AM

    Hi Faddi,

     

    I don't believe that "environment" is one of the attributes that is defined in a default (Out-of-the-box) implementation of Service Desk. Was this added as a custom field?

     

    At the server you can see all the attributes on the chg object with the following command:

     

    bop_sinfo -d chg

     

    Cheers,

    Lindsay



  • 16.  Re: Additional Search Arguments properly formatted query

    Posted May 15, 2015 03:34 PM

    You should take a look in the Schema designer. Just expend NR object and you'll see every extension SREL. You have to use them if you want to add search criteria in a list_***.htmpl file.

     

    For example, here we manage our iPhone in ServiceDesk. We wanted to be able to search for iPhone in the cmbd using the phone number, so i added a search textbox, mapped on a extension attribute.

     

    <PDM_MACRO name=sfTextbox hdr="Phone Number" attr="assoc_tel_wirx.phone_number" size=20>

     

    assoc_tel_wirx is the extension attribute for wireless device.

     

    Have fun



  • 17.  Re: Additional Search Arguments properly formatted query

    Posted Jan 18, 2016 11:21 AM

    hello, good evening!

     

    if we have some attribute (example "proc_type" ) that is present on several extended tables with the same tag/description (in this case "proc_type"), how could we format a form to accept dynamic factory search criteria? i mean: i want to search for a proc type, but it can be present on several different extended tables (har_serx, har_prix, har_monx, har_lparx, etc...) ?