Brutal 164 Posted May 15, 2014 Report Share Posted May 15, 2014 I scraped content into a table... Now, on the 4th column of each row it has a word, and what I want to do is create a new table that consists only of the rows that contain a specific word that is in the 4th column. Example: the 4th column might have the following words... my,me,you,they ... get me?... and I only want to capture the rows that contain the word 'me' in that column. Any ideas? Quote Link to post Share on other sites
the_way 52 Posted May 15, 2014 Report Share Posted May 15, 2014 if table cell contains "me" then copy cell to new tableelseincrement to next cell Quote Link to post Share on other sites
Brutal 164 Posted May 15, 2014 Author Report Share Posted May 15, 2014 Can you elaborate? set(#position, 0, "Global")loop($table total rows(&RESULTS)) { if($contains($table cell(&RESULTS, #position, 4), "us")) { then { } else { } }} Quote Link to post Share on other sites
the_way 52 Posted May 15, 2014 Report Share Posted May 15, 2014 at: then{ just copy the cell to a list or table, the else could be empty, and then outside the if, but still in the loop, just have delete row 0, that way you wouldn't have to increment the table row variable, it would always just check row 0, if it has 'us' then copy to other table, Quote Link to post Share on other sites
Brutal 164 Posted May 15, 2014 Author Report Share Posted May 15, 2014 I really appreciate the help man - And what you're saying makes perfect sense, I'm just not seeing any commands/functions to achieve that. Maybe I have just been awake too many hours :-) ... I'll go get some sleep and maybe it will be more clear to me when I come back. Thanks again. 1 Quote Link to post Share on other sites
the_way 52 Posted May 15, 2014 Report Share Posted May 15, 2014 Is it the actual words that you need out of that table? i'm not sure if your needing to record the actual row number or not yet, anyway if you're not, this would be nicer. loop while($comparison($table total rows(&results), ">", 0)) { if($contains($table cell(&results, 0, 4), "us")) { then { comment("move into a seperate list / table") } else { } } plugin command("TableCommands.dll", "delete from table", &results, "Row", 0) } Quote Link to post Share on other sites
Brutal 164 Posted May 16, 2014 Author Report Share Posted May 16, 2014 Thanks man .... Yep, was wanting to capture the complete row 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.