theoph Posted August 12, 2006 Posted August 12, 2006 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?
Ender Posted August 12, 2006 Posted August 12, 2006 Try: if(position(Keywords; "Business"; 1; 1); Company; Last Name & ", " & Greeting))
LaRetta Posted August 12, 2006 Posted August 12, 2006 (edited) "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, 2006 by Guest
Recommended Posts
This topic is 6677 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now