CA Service Management

Expand all | Collapse all

How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

Jump to Best Answer
  • 1.  How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-02-2015 07:32 AM

    We have extended our CMDB to include many 'non IT' services within our business.

     

    13 new families have been added, with 300 or so new attributes between them.

     

    We now wish to be able to search for CIs (ideally from within the standard 'list_nr.htmpl' page) using our new CI attributes as search criteria.



  • 2.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-02-2015 09:37 AM

    Hi alsturge - you would have to  add fields to the search section of the form for your newly added columns/attributes which you added to the CI object.  This can be done using Web Screen Painter and customizing the list_nr.htmpl form.  We recommend you do this on a test system first to test it out.

    Hope this helps,

    Thanks

    Jon I.



  • 3.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-02-2015 10:23 AM

    Hi Jon

    Do I do this by manually copying list_nr to site/mods/majic?

     

    Al



  • 4.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-02-2015 12:45 PM

    Jon

    Disregard previous email.

    Yes. I had already added the attribute from the family extension into the screens wsp file. Received an error saying that 'list_[extension].htmpl' could not be found.

    The new extension/factory is zCACC_Channels. The attribute therein is ACTIVDATE. This attribute is a text field, 10 chrs in length. It can be loaded with data and retains it ok. We owners to be able to search CIs by attributes.

    Once I'm back in office tomorrow can I send you the code I added to list_nr.htmpl.

     

    Cheers. Al.

     

    Sent from my iPhone

    07554 115984



  • 5.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-03-2015 08:56 AM

    Jon

    As per second email yesterday…

     

    The code I added (for another required attribute) to
    ‘list_nr.htmpl’ was in the format…

     

    <PDM_MACRO name=sfLookup hdr="Paid
    Service" attr="PAIDSERVICE" factory=zCACC_AFPEX_Contacts>

     

    If I then enter anything in the box then click ‘Search’, Service
    Desk opens a new window, which then reports

     

    AHD04407:CA Service Desk Manager html generation error.
    Could not find or process 'list_zCACC_AFPEX_Contacts.htmpl'.

     

     

     

    AHD04714:Unable to open file list_zCACC_AFPEX_Contacts.htmpl at ?: No such file
    or directory (2) userid=sam-bdn-801154

     

    The factory/object/attribute above is reflected in bop_sinfo
    output, and also features in ddict etc…

     

    I tried entering the attribute into the ‘Additional arguments’
    and got the message…

     

    (zCACC_AFPEX_Contacts.PAIDSERVICE = YES)" (Attr not found or
    not atomic)

     

    Earlier, when initially looking at this bit of development, I
    copied ‘list_nr’ to a new file ‘list_zCACC_Channels’ when I got the same error
    above for the first attribute – ACTIVEDATE in the object/factory
    ‘zCACC_Channels’. After publishing this and then entering something into the
    box and starting a search, the resulting ‘list’ of CIs was a grid of cells
    containing “COMMON.name could not be found” under the regular column headings
    for list_nr, without opening a new window.

     

    I have spent some time with CA Support (Karen Matoke in the UK)
    on chat, and she suggested some further changes were required to ‘the selection
    form’… and she said that CA Support would now pass me on to CA Communities for
    help…

     

    I'm guessing that our new attributes are not being recognised as objects yet and some further coding is required, or for some reason I cant get syntax right!

     

    Really hope this helps you help me… Cheers… Al



  • 6.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-07-2015 07:18 AM

    HI. THis is all a bit tricky.

    Well I'M not able to test this stuff currently.

    There needs to be an important prerequesite to be able to search for attributes of a so called extension table.

    You need to define a BREL attribute in the nr factory hodling a list of the extsension records assigned to an nr object. it may look like:

    zassoc_cacc_afpex_cnt  BREL zCACC_AFPEX_Contacts   id DYNAMIC { UI_INFO "dtlTextbox"; };

    a sflookup macro is only valid and useful for so called SREL attributes.

    Assuming thet your PAIDSERVICE attribute is a STRING attribute

    something like

     

    <PDM_MACRO name=sfTextbox hdr="Paid
    Service" attr="zassoc_cacc_afpex_cnt.PAIDSERVICE" >

     

    may work.

    Hope this helps

    Regards

    ..........Michael



  • 7.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-10-2015 03:43 AM

    Michael

    Many thanks for this. I am discussing further with CA Services, and will reply to this post once progress has been made

     

    Al



  • 8.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?
    Best Answer

    Posted 01-07-2016 08:47 AM

    To any looking at this post, thnkas to Michael Mueller above and CA Services, I have now found the correct syntax to use...

     

    <PDM_MACRO name=sfDropdown hdr="[attribute screen name]" attr=assoc_[attribute table name].[attribute field name]>

     

    Thanks to all for helping out a newbie :-)



  • 9.  Re: How to implement searching of CIs by custom attributes of custom families from 'list_nr.htmpl' ?

    Posted 12-03-2015 08:55 AM

    Jon

    As per second email yesterday…

     

    The code I added (for another required attribute) to
    ‘list_nr.htmpl’ was in the format…

     

    <PDM_MACRO name=sfLookup hdr="Paid
    Service" attr="PAIDSERVICE" factory=zCACC_AFPEX_Contacts>

     

    If I then enter anything in the box then click ‘Search’, Service
    Desk opens a new window, which then reports

     

    AHD04407:CA Service Desk Manager html generation error.
    Could not find or process 'list_zCACC_AFPEX_Contacts.htmpl'.

     

     

     

    AHD04714:Unable to open file list_zCACC_AFPEX_Contacts.htmpl at ?: No such file
    or directory (2) userid=sam-bdn-801154

     

    The factory/object/attribute above is reflected in bop_sinfo
    output, and also features in ddict etc…

     

    I tried entering the attribute into the ‘Additional arguments’
    and got the message…

     

    (zCACC_AFPEX_Contacts.PAIDSERVICE = YES)" (Attr not found or
    not atomic)

     

    Earlier, when initially looking at this bit of development, I
    copied ‘list_nr’ to a new file ‘list_zCACC_Channels’ when I got the same error
    above for the first attribute – ACTIVEDATE in the object/factory
    ‘zCACC_Channels’. After publishing this and then entering something into the
    box and starting a search, the resulting ‘list’ of CIs was a grid of cells
    containing “COMMON.name could not be found” under the regular column headings
    for list_nr, without opening a new window.

     

    I have spent some time with CA Support (Karen Matoke in the UK)
    on chat, and she suggested some further changes were required to ‘the selection
    form’… and she said that CA Support would now pass me on to CA Communities for
    help…

     

    I'm guessing that our new attributes are not being recognised as objects yet and some further coding is required, or for some reason I cant get syntax right!

     

    Really hope this helps you help me… Cheers… Al