How to append a stringlist to a string coulomn

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]

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])

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

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.

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

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.

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

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).