Is there a way to retrieve the table filter from the table, rather than the somewhat more inelegant method of saving it to a global variable every time it's changed?
Scenario:
sub pick_a_value
'user picks a value & operator to filter table by
'a="<5"
o="<"
f=5
table1.filter("value"&o&f)
Get_the_rest
end sub
sub Get_the_rest
'This sub adds up the scores for all table entries apart from those already chosen
'table1.filter("value<>"&a) 'Ooops, looks like we need 2 global variables!
table1.filter("value<>"&f)
DoTheMaths
'Put things back as they were (for no real reason in this example)
table1.filter("value"&o&f)
end sub
Scenario:
sub pick_a_value
'user picks a value & operator to filter table by
'a="<5"
o="<"
f=5
table1.filter("value"&o&f)
Get_the_rest
end sub
sub Get_the_rest
'This sub adds up the scores for all table entries apart from those already chosen
'table1.filter("value<>"&a) 'Ooops, looks like we need 2 global variables!
table1.filter("value<>"&f)
DoTheMaths
'Put things back as they were (for no real reason in this example)
table1.filter("value"&o&f)
end sub