Clarity Service Management

Expand all | Collapse all

Replace Function Use For Spell Code

Jump to Best Answer
  • 1.  Replace Function Use For Spell Code

    Posted 04-20-2017 09:57 AM

    Hi,
    In the description field  "  if it exists, I want to change it.
    The following code is getting syntax error. I want to use this code in spell.
    Is it possible use to replace function in spell code?
    How can I do it?

     

    Thanks

    Ozge

     

    ***

    string command2;

    var res;
    res = description.replace(/\"/g, "");

    command2 = format('launchit C:\\ODYAFiles\\Odya_ResolvedDesc\\SDFieldUpdate.exe %s %s "%s" ', call_req_id, 'zODYA_ResolvedAciklama' , res );
    logf (ERROR, format("zODYA_ResolvedAciklama alani guncellendi222 %s %s %s ", call_req_id,'zODYA_ResolvedAciklama', res ));
    exec(command2);
    ***



  • 2.  Re: Replace Function Use For Spell Code
    Best Answer

    Posted 04-20-2017 10:20 AM

    Hi,

    you can use gsub, here is quick description: CA SDM::.SPEL::. Gsub 

    Regards,

    cdtj



  • 3.  Re: Replace Function Use For Spell Code

    Posted 04-21-2017 08:55 AM

    Thanks for your help CDTJ

    We used the following code and found a solution.

     

    ***

    if(type == "RE")
    {
    string command2;
    string a;
    a = gsub(description, "\"", "");

    command2 = format('launchit C:\\ODYAFiles\\Odya_ResolvedDesc\\SDFieldUpdate.exe %s %s "%s" ', call_req_id, 'zODYA_ResolvedAciklama' , a );
    logf (ERROR, format("zODYA_ResolvedAciklama alani guncellendi %s %s %s ", call_req_id,'zODYA_ResolvedAciklama', a ));
    exec(command2);

    }

    ***

     

    Thanks & Regards 

    Ozge Ozturk