Newbies Ranginald Posted August 24, 2003 Newbies Posted August 24, 2003 I'm having trouble with a simple find script in filemaker (and I'm coming from a SQL background). I want to look in the list of sales (my sales file) (having the fields: employee, product, number sold, etc. etc) and pull all the records associated with employee "smith". In scriptmaker I think the format should be something along the lines of(from reading this and other boards): Find Mode Set field and select the appropriate search criteria Perform Find It's been suggested to have the format along the lines of: Set Field[Employee, "==Smith" in order to return all the records with smith. 1. I can't seem to get ANY finds to work and I don't know where to look to get guidance (the FM documentation is very thin). Where can I find the EXACT syntax for executing a find? 2. How can I manually enter the ==Smith thing above. The program seems to only want to let me enter pre-existing commands and fields. 3. What would I do to modify this find so as to return not only the number of records from employyee smith, but also a count of the number of records. 4. Is there some source for scriptmaker syntax? A good reference book? Thanks, R.
Lee Smith Posted August 24, 2003 Posted August 24, 2003 Hi Ranginald, Actually you aren't that far off of what you want to do. You need to create a global field in order to set the field, but your syntex isn't that far off. Create the global and type in the find critera "Smith" Then create your script with these steps. Enter Find Mode SetField (employee, global) perform find HTH Lee
Newbies Ranginald Posted August 24, 2003 Author Newbies Posted August 24, 2003 Thanks so much. Now what if I wanted to count the number of records returned? Should I do it with a report on top of the script, or add it to the script? And is there a good book on this kind of stuff -- I hate to keep bothering everyone with things that can likely be found in a book? Thanks, R
Newbies Ranginald Posted August 24, 2003 Author Newbies Posted August 24, 2003 Forgive me but if I try to enter (in the 'specify calculation' dialogue): employee, global is returns "there are too many separators in this function" I cannot seem to get to the place where I can get two fields into a set field selection. How can I do this? Thanks, R.
ernst Posted August 24, 2003 Posted August 24, 2003 If you select the set field script step you will see two buttons in the bottom right corner. The top button will let you set the target field (employee), the other will let you specify the calculation. (global) If you define an extra calculated field with the following definition: Status(CurrentFoundCount) then you'll have a field that will always display the amount of records found. About documentation: In the electronic documentation folder that resides inside the Filemaker folder there's a reasonably big manual. Further you could have a look in the 'Samples' section of this forum to find out more. Regards, Ernst.
Lee Smith Posted August 24, 2003 Posted August 24, 2003 And, Don't forget the Online Help that is built into FileMaker (Cmd + ? on a Mac (also the Help Key)). It is actually pretty good in explaining things, and giving examples of calculations, and scripts. For example, if you typed in "Set Field" into the Index View of the Online Help, you will see in the list "Set Field script step" and by double clicking on that, you will get a second box that tell's you about Set Field Script Step, and example of it's use, what the "Specfic" boxes are. HTH Lee
Newbies Ranginald Posted August 24, 2003 Author Newbies Posted August 24, 2003 When you say to type in the find criterial, do I do that with a value list definition for the global, or do I do it in the "perform find" sub menu where it allows me to select text or a field? Thanks, R. Boy this is different from SELECT statements!!1
Lee Smith Posted August 25, 2003 Posted August 25, 2003 If you created the global that I spoke of in my first response. Than it is a matter of typing your search crietera into your Global field (prior to running your script), i.e. Smith, and then run your script that has the set field script step in it. [color:"blue"]> Boy this is different from SELECT statements!!1 In a way, you are saying Select Statement!!1. But instead you are saying Set Field Global. HTH Lee
Recommended Posts
This topic is 7765 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