February 1, 200520 yr Hi, I need to do a calculation that compares two fields, and if the contents of one field are included in the other field it performs an action on them. I only know how to say if A = B exactly, not if A is part of B. What command do I use to represent a wildcard, like if A = *B*? Thanks! Andrew
February 1, 200520 yr The PatternCount() or Position() function will do this. E.g.: Position( B ; A ; 1 ; 1 ) This means, "look in field B for the text A, starting at the first character, where is A." Position(text;searchString;start;occurrence) So any non-zero result will evaluate as true. Using Position should evaluate faster than PatternCount in theory, since it can stop evaluating after the first occurrence, whereas PatternCount has to scan the entire text.
Create an account or sign in to comment