Hi All,
I haven't posted for a while, so thought I'd tax your brains a little today (as well as test my luck!)...
I have two comma separated strings that I need to compare. Assume one string is a list of item composition attributes (ie, wood, plastic, metal, glass, etc). The other list is a list of attributes I want to search for (items containing glass AND plastic).
The result I would like is for it to work out if both "glass" and "plastic" are in the list, but not only just those two. For example, to find matches with "plastic,glass":
Obviously, this can simply be done with separate tables in a FOR EACH statement, a simple DO loop, or some combination of multiple LOOKUP, MATCHES, or CAN-DO statements, but for reasons of complexity can't be used in that way. Also, this will sit inside multiple FOR EACH and FIND WHERE clauses, so a user defined function doesn't work (which would be a really nice answer!)
MATCHES logically comes close, but with it not using REGEX, I can't think of a way it can be used in this case. And I know it will screw any indexes, but other obscure search requirements already do that.
I can explain how my code works, but it would take a long post of a handful of long paragraphs, so I haven't; suffice to say it's not urgent, and I'm not actually expecting something like that to exist, but just thought I'd ask...
Thanks in advance.
I haven't posted for a while, so thought I'd tax your brains a little today (as well as test my luck!)...
I have two comma separated strings that I need to compare. Assume one string is a list of item composition attributes (ie, wood, plastic, metal, glass, etc). The other list is a list of attributes I want to search for (items containing glass AND plastic).
The result I would like is for it to work out if both "glass" and "plastic" are in the list, but not only just those two. For example, to find matches with "plastic,glass":
Code:
Item 1 "plastic" FALSE
Item 2 "wood" FALSE
Item 3 "metal,glass,paper,plastic" TRUE
Item 4 "glass,plastic" TRUE
Obviously, this can simply be done with separate tables in a FOR EACH statement, a simple DO loop, or some combination of multiple LOOKUP, MATCHES, or CAN-DO statements, but for reasons of complexity can't be used in that way. Also, this will sit inside multiple FOR EACH and FIND WHERE clauses, so a user defined function doesn't work (which would be a really nice answer!)
MATCHES logically comes close, but with it not using REGEX, I can't think of a way it can be used in this case. And I know it will screw any indexes, but other obscure search requirements already do that.
I can explain how my code works, but it would take a long post of a handful of long paragraphs, so I haven't; suffice to say it's not urgent, and I'm not actually expecting something like that to exist, but just thought I'd ask...
Thanks in advance.