Jump to content
UBot Underground

Breaking Up One Item List into Multiple Items


Recommended Posts

I've been searching around and haven't found a solution yet.  I am sure this is doable, if I remember correctly there is some type of format data has to be in in order to get items to list sepearately when adding an item to a list.  I have a variable Customer =

 

Number

Type
Description
Release Date
Status 
 
12345
Outside
Letter Regarding Notification #12345
05/29/2014
Open
 
14785
Internal 
Email and Letter Regarding Notification #14785
03/09/2009
Closed
 
98741
Outside
Email and Letter Notification Regarding #98741
02/08/2011
Closed
 
85214
Outside
Call, Email, and Letter Notification Regarding #85214
03/18/2014
Open
 
96589
Internal
Email and Letter Notification Regarding #96589
06/08/2009
Closed
 
11447
Internal
Letter Regarding Notification #11447
04/04/2013
Closed
 
What I need to do is get each of these items listed as an individual item so that I can break them up into a table, adding them as a list from this variable just puts them in the same format (as one item).  The ultimate goal is to get the data into a table.  Any help on how to break these up would be greatly appreciated.
 
Thanks!

Will
Link to post
Share on other sites

Let me preface this by saying that this is not an ideal situation but if you are 100% positive that the data will always be like that then this is one of the ways you can do it.

 

But I really think you should be scraping each individual variable directly into the correct table cell for best results, maybe if you tell us how you are getting these list items like that it would be helpful and show us where you are getting them from so we can give you a better answer.

 

But in a pinch this will work (added a few of your list items into there to show how it works)

clear table(&data)
set table cell(&data, 0, 0, "Number")
set table cell(&data, 0, 1, "Type")
set table cell(&data, 0, 2, "Description")
set table cell(&data, 0, 3, "Release Date")
set table cell(&data, 0, 4, "Status")
clear list(%items)
add item to list(%items, "12345
Outside
Letter Regarding Notification #12345
05/29/2014
Open", "Delete", "Global")
add item to list(%items, "14785
Internal 
Email and Letter Regarding Notification #14785
03/09/2009
Closed", "Delete", "Global")
add item to list(%items, "98741
Outside
Email and Letter Notification Regarding #98741
02/08/2011
Closed", "Delete", "Global")
set(#row, 1, "Global")
loop($list total(%items)) {
    clear list(%split)
    add list to list(%split, $list from text($next list item(%items), $new line), "Delete", "Global")
    set(#column, 0, "Global")
    loop($list total(%split)) {
        set table cell(&data, #row, #column, $next list item(%split))
        increment(#column)
    }
    increment(#row)
}

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...