CA Service Management

  • 1.  site defined condition wild card or sindex syntax

    Posted Nov 09, 2016 02:30 AM

    is there any way add wildcard in site defined condition. scenario is following:

    ticket type Indicent

    status Resolved

    group "%abc%"



  • 2.  Re: site defined condition wild card or sindex syntax

    Posted Nov 09, 2016 03:35 AM

    Hi,

    check this thread: https://communities.ca.com/message/241836367?commentID=241836367#comment-241836367 

     

    Condition could be:

    if ( (type == 'I') && (status == 'RE') && (sindex(group.last_name, 'ABC') > -1) )

       set_return_data(TRUE);

    else

     set_return_data(FALSE);

     

    Regards,

    cdtj



  • 3.  Re: site defined condition wild card or sindex syntax

    Posted Nov 09, 2016 04:28 AM

    r u talking about Action Macro or Site Defined?

    by the way here is my export of Site Defined Condition Macro (I tried adding what u say but it wont work.. please edit with Category.Sym == "abc"):

     

    TABLE Spell_Macro

                    del description fragment id last_mod_by last_mod_dt lock_object msg_html

                    msg_tmpl_info ob_type persid sym tenant type usr_integer1 usr_integer2 usr_integer3

                    usr_string2 usr_string3 usr_string4

                    { "1" ,"",

                    "if (( !is_null(getval_by_name(\"type\")) &&  getval_by_name(\"type\")  == \"I\" ) && ( !is_null(getval_by_name(\"status\")) &&  getval_by_name(\"status\")  == \"RE\" ))\\0012set_return_data(TRUE);\\0012else\\0012set_return_data(FALSE);\\0012",

                    "400189" ,"FXXXXXXXX45BED70A9D98CCAD17" ,"11/09/2016 12:17:00" ,"0" ,"",

                    "" ,"cr" ,"macro:400189" ,"test2" ,"" ,"COND_SITE" ,"" ,"0" ,"" ,"" ,"" ,"" }



  • 4.  Re: site defined condition wild card or sindex syntax

    Posted Nov 09, 2016 05:58 AM

    Yeap, about site-defined condition.

    An easiest way to modify those macros is to enable editing on the form:

    - copy detail_macro.htmpl form from bopcfg directory to site/mods;

    - open it for edit using notepad (or you can use Web Sceen Painter as well);

    - find this string (could vary depending on localization):

    <PDM_MACRO name=dtlReadonly hdr="Macro" attr=usr_string1>

    - and replace with this one:

    <PDM_MACRO name=dtlTextbox hdr="Macro" attr=usr_string1 colspan=6 rows=17 size=120 spellchk=no>

    - now reset web cache using pdm_webcache -H

     

    Form will look like:

     

    and you can modify macros without extracting/uploading them.



  • 5.  Re: site defined condition wild card or sindex syntax

    Posted Nov 09, 2016 01:05 PM

    I would recommend Condition macro rather than Site-defined Condition macro.