J__ Posted December 16, 2004 Posted December 16, 2004 I have layout which contains a listview of names I put some buttons at the top like a phone book and added a find [A] for the A button, find for B button and so on. I noticed that when I click the 'A' button, it finds not only names that begin with A, but names that have an A anywhere in the field. I really want to only find the names that Begin with A. in Perl it's ^A I looked through the online help of filemaker, but did not see any mention of how to specify 'begins' with A Regarding the approach above, is there an easier way to do this button / phone book lookup letter approach? For example, could I somehow get the text of the button, then pass that to a script, which will allow me to specify the letter in a find? thanks for your help in advance, sincerely, J__
RalphL Posted December 16, 2004 Posted December 16, 2004 What I have done in earlier versions is make a calculated field = Left(Name; 1) and use this as the search field.
Lee Smith Posted December 16, 2004 Posted December 16, 2004 [color:"red"] Do Not Double Post in the Forum
J__ Posted December 16, 2004 Author Posted December 16, 2004 What do you mean by double post? If i did double post this, then it was not intentional. I don't think i asked this qauestion anywhere else did I? thanks, J__
Barbecue Posted December 16, 2004 Posted December 16, 2004 To find entries that begin with A, use ==A* as the criterion. This will find only items where A is the first character in the text. FileMaker searching is pretty weird when compared to regular expressions, but it's powerful once you learn the syntax.
J__ Posted December 16, 2004 Author Posted December 16, 2004 thanks Barbecue! really appreciate it. sincerely, J__
J__ Posted December 17, 2004 Author Posted December 17, 2004 Uh Barbecue or anyone, the second part to my question was is there an easier way to do this then having to click , what 5 times, for each button to set the find option? thanks, J__
-Queue- Posted December 17, 2004 Posted December 17, 2004 Are you asking if you need to have a separate script for each find? The answer to that would be no. You only need one script like Allow User Abort [Off] Set Error Capture [On] Enter Find Mode [ ] Set Field [yourfield; "==" & Get(ScriptParameter) & "*"] Perform Find [ ] If [not Get(FoundCount)] Show Custom Dialog ["There are no records starting with " & Get(ScriptParameter) & "."] Show All Records End If Each button should call the script and pass the appropriate letter to it.
PCGMKTG Posted March 30, 2005 Posted March 30, 2005 Queue I have tried to run this script and can manage to get it to say "There are no records starting with A" but that's it. How do I "call the script and pass the appropriate letter to it"? I tried typing in an "A" in the optional script parameter section but it doesn't do anything. Thanks
Recommended Posts
This topic is 7517 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