Release Automation

  • 1.  How to convert String Array to a string

    Posted Sep 15, 2016 03:26 PM

    Hi All,

     

    I need to convert the string array to string. Here is an example what i need.

     

    String array :  TableNames[abc, pqr,xyz]

     

    expected string : abc,pqr,xyx

     

    I am having situation where I have to give number of table names as a input to a command and these table names should be comman separated.

     

    here is the command which i have to execute. the table names are bold:

     

    expdp ADOPT/****** DIRECTORY=BK_DUMP_DIR DUMPFILE=ADOPT_20160820_TABLES.dmp logfile=EXP_ADOPT_20160820_TABLES.log TABLES=AD_LEAD_SITE,AC_SWC_CLLI,AC_NPANXX,AC_ATTCO_LVH,AC_ATTCO_SVC,AC_SWC_SVC,AC_NPANXX_PR,AC_LEC_INFO



  • 2.  Re: How to convert String Array to a string

    Broadcom Employee
    Posted Sep 15, 2016 03:50 PM

    The "Execute JavaScript code" should be able to do the job and is an action available out of the box. But I also was shown the field utility action pack posted here: CA Field Utility Action Pack 

    This has an action: String - Join Array Into Single Strig



  • 3.  Re: How to convert String Array to a string

    Broadcom Employee
    Posted Sep 15, 2016 03:52 PM

    Oh, and if you're interested in using javascript action then these KB Articles talk about doing the reverse but give some assistance with getting familiar with the action...

    Split Strings Into Array With Execute JavaScript regex

    Removing empty elements from Array Using Execute JavaScript action 



  • 4.  Re: How to convert String Array to a string
    Best Answer

    Broadcom Employee
    Posted Sep 15, 2016 04:01 PM

    Following up on Greg’s comments.  Use the javascript  array toString method in the RA javascript action.  Basically one line

     

    output1=arrInput1.toString()

     

    where output1 will be your string parameter

    arrInput1 will be your string array

     

    regards



  • 5.  Re: How to convert String Array to a string

    Broadcom Employee
    Posted Sep 16, 2016 05:03 AM

    Verified the answered by Billy let us know if you face any issue.