Steve G Posted September 29, 2008 Posted September 29, 2008 In a given text field, is there a way to calculate the expression "if the field contains" (and similarly, "does not contain")? IOW, if I had five name records: John Smith Mary Jones John White Peter Johnson Jill Jackson I want a calculated text field to generate a result based on whether (or not) the name record contains the word "john" (which would include John Smith, John White, and Peter Johnson). Is there a way to do it?
aldipalo Posted September 29, 2008 Posted September 29, 2008 The question is do you want this hard coded into your script or do you want the user to enter the data the field contains? Hard Coded: Enter Find Mode() Set Field(yourfield;"John") Perform Find() User Enters: create a global field g_yourfield Show Custom Dialog(Enter data;G_yourfield[button; OK;Cancel]) If (get(LastMessageChoice)=2) Exit Script EndIf Enter Find Mode() Set Field(yourfield;g_yourfield) Perform Find() hth **** My scripts almost always need some tweaking and I have not tried this in real time, but, the concept is there.
David Jondreau Posted September 29, 2008 Posted September 29, 2008 Check out the function called PatternCount().
alwynus de winslow Posted November 20, 2008 Posted November 20, 2008 Pattern Count - Excellent suggestion. Thanks!
Recommended Posts
This topic is 5906 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