webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to append a stringlist to a string coulomn

    Posted Tue March 03, 2009 01:15 PM

    Hi all,

    I want to appent a sting list to a stringtable which is having 2 coulomns.
    I m using
    PSUtilities.misc:appendStringListToStringTable
    but it is throwing null pointer exception as the number of elements in the list and number of coulumn in the table should be same.


    [FONT=Arial Narrow][SIZE=3]Can anyone help me on the same
    [/size][/font]


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How to append a stringlist to a string coulomn

    Posted Tue March 03, 2009 04:41 PM

    If you don’t have time constraint and the list are not big you can use Loop.

    Here is how:
    input1[i]
    input2[j]
    Table[i,j]

    Loop (Input array input1, output array Table) //Table become list (first column)
    - Map (input1 - Table[i,0])
    Loop (Input array input2, output array Table) //Table become list (Second Column

    • Map (input2 - Table[i,1])

    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: How to append a stringlist to a string coulomn

    Posted Wed March 04, 2009 07:33 AM

    Thanks kerni

    But What I have do to is I have a strins with four elements
    and I have to append it to a table with 2 coulomns and 2 row
    I n first coulumn 1 and 3 elament of the list andd in second coulomn 2 and 4 element of the list.

    Any help will be appreciated.

    Thanks


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: How to append a stringlist to a string coulomn

    Posted Wed March 04, 2009 03:12 PM

    Do you mean the first column will have 3 elements, and the second column will have 4 elements? If yes, my approach will work except Table (0,4) will have NULL value.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: How to append a stringlist to a string coulomn

    Posted Thu March 05, 2009 05:51 AM

    Hi kerni
    NO its not like that

    see what i have to do is I have to take a stringTable with 2 coulomns like
    K1 O1
    K2 O2
    K3 O3
    now have to take an input string as key if key is k1 it will delete the corressponding row and the rest table will be output

    so output will be
    K2 O2
    K3 O3

    I am able to delete that row but want to append this two row into a new table


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: How to append a stringlist to a string coulomn

    Posted Thu March 05, 2009 06:34 PM

    Can you clarify what you need to do? Your first post stated you have a string list. Your next post stated you have a string with 4 elements. Your last post indicates you have a string table from which you want to create a new table, excluding a particular row.

    Please be a specific as you can and someone should be able to devise an approach for you.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: How to append a stringlist to a string coulomn

    Posted Fri March 06, 2009 05:54 AM

    I am sorry for that.

    What exxactly the scenario is I have to take a string table as an input with two coulomns key and output like

    K1 O1
    K2 O2
    K3 O3
    K4 O4
    then I have to take a input string key
    if the key is k1 it
    In OutPut it should delete the respective row i.e
    Output will be a string table with following values.

    K2 O2

    K3 O3

    K4 O4

    Can any one help me out


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: How to append a stringlist to a string coulomn

    Posted Mon March 09, 2009 07:52 PM

    If that is what u need, here is my suggestion.

    • Use stringTableToDocumentArray to change the table to document.
    • Loop over the array of the document list (documentArray/ArrayOfstring).
    • Within the loop put a branch and check your condition (%documentArray/ArrayOfstring/ArrayOfstringItem[0]% != %key%).
    • If the condition met the requirements append the string list (K1 O1 for example) to a temporary document.
    • Finally use documentArrayToStringTable to change the temp document to a string table (your output).

    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB