CA Service Management

 View Only
  • 1.  Change Order message template - how to add CI(s)?

    Posted Apr 05, 2016 02:25 PM

    We need to add the list of associated CIs to an email notification re: Change Orders.  Because the association relies on an lrel table, usp_lrel_asset_chgnr, I'm not sure how to write this into the template or if it's even possible?

     

    For example, when I add change type to the message template, I use @{change_id.chgtype.sym}, but I'm not sure how to link potentially many CIs?

     

    Thanks!



  • 2.  Re: Change Order message template - how to add CI(s)?

    Posted Apr 05, 2016 02:45 PM

    Hi Rebecca,

    Unfortunately this would not be possible as you guessed correctly.  The reason is because there is no attribute to link an LREL field as its not a named "object" within the change object itself such as "@{change_id.chgtype.sym}."

    This one would make for a good "idea" to post on the communities though - I do understand your use case for having this ability

    Thanks,

    Jon I.



  • 3.  Re: Change Order message template - how to add CI(s)?
    Best Answer

    Posted Apr 05, 2016 03:35 PM

    Hi,

      Not in front of a dev server to test fomr the chg object but Lrel are returning an array.

    You can normally access each element of the array individually by using their index number.

    something like:

    @{change_id.asset.0.name}

    the down side is that you can't  add logic into your notification so you will have to hardcode a fix number of asset to retrieve.

    @{change_id.asset.0.name}

    @{change_id.asset.1.name}

    @{change_id.asset.2.name}

    @{change_id.asset.3.name}

    ...etc

    Hope this help

    /J



  • 4.  Re: Change Order message template - how to add CI(s)?

    Posted Apr 05, 2016 05:00 PM

    jmayer, you're the bomb!

     

    This works, so I'm going to run #s and build for the avg # of CIs attached to a change order so I know how many to build onto email.  The blanks display nicely as blanks rather than errors, so we're good to go.