August 12, 200619 yr Wanting to use a Database field to calculate its value from another Database field called "Keywords" by finding a keyword. If(Keywords = "Business"; Company; Last Name & ", " & Greeting) However, if more than one word is in the field "Keywords" the result is negative. How can I search the field "Keywords" and get my desired results?
August 12, 200619 yr Try: if(position(Keywords; "Business"; 1; 1); Company; Last Name & ", " & Greeting))
August 12, 200619 yr "if more than one word is in the field "Keywords" Yes, the = will not work if there are more words than Business. Instead, use Position() or PatternCount(). I'm unsure how you are using it to give you specifics but here's the idea (BTW, Position() is more efficient than PatternCount() so try to use it instead ... not not Position ( theField ; "Business" ; 1 ; 1 ) This boolean test will produce a 1 if Business exists within the field. ...or PatternCount ( theField ; "Business" ) will count how many times it appears. It too can be turned into boolean by adding not not to the beginning. UPDATE: You're fast on the draw this morning, Mike. :wink2: Edited August 12, 200619 yr by Guest
Create an account or sign in to comment