Dana G Posted July 1, 2005 Posted July 1, 2005 I am a newbie at scripting. I need to be able to assign a script to a button that will enter find mode, allow the user to enter criteria, then sort the found records in descending order. I get the find and sort to work fine but no matter how I sort before I write the script I can't get them to sort in DESCENDING order. I'm sure it's simple and I would appreciate anyone's knowledge. Thanks.
SlimJim Posted July 1, 2005 Posted July 1, 2005 Is it this simple? When you set up your sort select the field that you wish to sort descending in the sort order and then click the sort descending radio button in the sort dialog.
Lee Smith Posted July 1, 2005 Posted July 1, 2005 FileMaker remembers the last "Find, Sort, Import, Export and Page Setup" performed. If you want to put any of these step in a Script, you need to perform them manually first. Once you have your Find, Sort, etc. the way you want it, Go into ScriptMaker and create your script. Be sure to include any steps perform (i.e. Perform Find and Sort.) and you should have what you want. If you need to modify a script, first perform it manually and get it the way you want it. Then go into Scriptmaker, select the Script to be updated, and clink "Edit", and then "Okay" or "Done" (bottom of the box). This will bring up a second menu that has the option of "Keep" and "Replace" for any steps used in the script (Mentioned in my first sentence). If I'm understand you correctly, you want to REPLACE both of the Find and the Sort in your script. HTH Lee
Lee Smith Posted July 1, 2005 Posted July 1, 2005 Hi SlimJim Good Point, guess we should also mention the need to select the Field to be sorted, and check the Radio button for Ascending or Descendingt. Lee
Dana G Posted July 5, 2005 Author Posted July 5, 2005 Thanks for your input. Turns out that I had skipped a script step. I had done the pre-ScriptMaker sorting but in my script I only had "enter Find Mode". I did not instruct it to "perform find". Works wonderfully now.
Recommended Posts
This topic is 7084 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