Jump to content
UBot Underground

Removing Duplicates without "Delete"


Recommended Posts

Hi all,

 

I have a list that on some lines it has the same results in twice - see below image:

 

 

 

http://content.screencast.com/users/koconnor00/folders/Jing/media/ac564ce0-454e-4386-ae51-d860cbff6496/2013-05-28_0919.png

 

 

 

What I'm doing is taking each list item and adding it to a "$next list item" however i run across a problem when one of the list items has that double line in it.

 

I don't want to remove the duplicates as some lines have no data in them (and that's ok, I need to know that) so by deleting duplicates it would get rid of them.

 

So, I dont mind setting a variable as a list item, however if I do that it will set the variable to exactly what is in each line, including the duplicate rows.

 

How can I get around this?

 

Thanks,

 

Kev

Link to post
Share on other sites

Well, you actually need to loop through the list and run each item through an IF to detect if it's empty (and leave it like that), while when it is not empty to get only one instant of the dupe there.

Link to post
Share on other sites

This is how I would do it.

clear list(%placespagedata)
clear list(%placespagedata_sorted)
add item to list(%placespagedata, "Item 1
Item 1", "Delete", "Global")
add item to list(%placespagedata, "Item 2
Item 2", "Delete", "Global")
add item to list(%placespagedata, "Item 2", "Delete", "Global")
set(#placespagetext, %placespagedata, "Global")
add list to list(%placespagedata_sorted, $list from text(#placespagetext, $new line), "Don\'t Delete", "Global")

Carl  ;)

Link to post
Share on other sites

set(#cleaner%yourlist"Global")
clear list(%yourlist)
add list to list(%yourlist$list from text(#cleaner$new line), "Delete""Global")

easy and works fast

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