Qurius 1 Posted September 15, 2015 Report Share Posted September 15, 2015 Hello - Hoping someone can help me with this...I've pulled data from a column in a table and added it to a list. The data is just repeating numbers that are either 1,2 or 3. I need to get a total count of each of those numbers to put in variables i.e. 3 one's, 4 two's etc. I've tried every way I can think of and not good with regex so if anyone has a simple way to do this I'd appreciate it. Thanks Quote Link to post Share on other sites
the_way 52 Posted September 15, 2015 Report Share Posted September 15, 2015 loop while, list count, and then an if statement that increments each time the variable matches Quote Link to post Share on other sites
Qurius 1 Posted September 15, 2015 Author Report Share Posted September 15, 2015 Thanks for the help...I'll see if I can make that work. Quote Link to post Share on other sites
deliter 203 Posted September 16, 2015 Report Share Posted September 16, 2015 there is probably a better way to do this,as was a lot of new list functions added recently,havn't learned them yet,change the %myList to your list name on the add list to table as column define $DuplicatesCount(#Duplicate) { add list to table as column(&Results,1,1,%myList) set(#counter,0,"Local") loop while($comparison($plugin function("TableCommands.dll", "$table search", &Results, #Duplicate, "Row Index"),">","-1")) { set table cell(&Results,$plugin function("TableCommands.dll", "$table search", &Results, #Duplicate, "Row Index"),1,"") increment(#counter) } clear table(&Results) return(#counter) } 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.