Search Project Mgmt
Search FileMaker Blogs
Friday
Aug312007

FILEMAKER: Go To Record / Request / Page Script Step

From Dwayne Wright - www.dwaynewright.com

Go To Record / Request / Page is one of the few commands that does something a little different based upon the mode that you are in. In Browse mode, it will go to a defined record in the FOUND SET (sorry for the all caps, but that found set part is important to remember). The next two options are not used that often but can add to some very interesting scripts. In Find mode, it will go to one of your Find Requests (can’t say that I’ve ever seen this in a script). In Preview mode, it goes to a print preview page.

Via the options pull down menu, you can go to the first, last, next, previous or by calculated value. First will go to the first record in the found set, the first find request or the first page to print. Last will go to the last record in the found set, the last find request or the last page to print. Next will go to the next record in the found set, the next find request or the next page to print. Previous will go to the previous record in the found set, the previous find request or the previous page to print.

The go to record next and go to record previous also have the option to exit after the last. This is used so you can easily exit out of a loop operation that is going from record to record.

The calculation option is used to add an almost unlimited flexibility to scripted navigation. One example is to go to a random record. Recently, I’ve been posting a FileMaker term each day to my Term Of The Day blog. Most of these terms I’ve written over the years in my guides and new terms come to light all the time. I have just over 500 terms currently. In my “Pick A Term” script, it does a find for terms I haven’t posted to the blog yet. Then does a Go To Record script step via the calculation of the Random function times the number of records in the found set. That way, I get a random term to publish every day!

HOW IT IS USED
The Go To Record script step can be used in dozens of different ways. It is commonly used when the designer hides the FileMaker status area from the user. The user cannot navigate record to record by using the flip book. This requires a designed set of buttons to navigate through records. The designer may decide to put background script steps along with the Go To Record steps.

The Go To Record step is also commonly used in looping script operations.
FileMaker will perform a set of tasks on one record, go to the next record and perform those steps again (exiting the loop on the last record).

COOL IMPLEMENTATIONS OF IT
I built a FileMaker solution that audited any change in a number of key fields whenever the navigational buttons were clicked. This background auditing was done on a record by record basis whenever the Go To Record buttons were clicked on.
Got To Know Factor - 6

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Tuesday
Aug212007

FILEMAKER: The Go To Layout Script Step

From Dwayne Wright - www.dwaynewright.com

This script step will take you to a layout in the current window / file.

You cannot go to a layout in another window unless to go to that window first. Also, you cannot have a GO TO LAYOUT step for a layout in an outside file. A way around this is to have your script, call an external subscript in another file, which in turn would have the GO TO LAYOUT step.

You also can specify a layout by it’s number in the layout order list. This is done by using a calculated value specified in the options of the Go To Layout script step. If you reorder your layouts however, this script could take you to the wrong layout.

You also can specify a layout by it’s name. This is done by using a calculated value specified in the options of the Go To Layout script step. If you rename your layouts (or don’t use unique layout names however, this script could take you to the wrong layout.

You also have the option to take the user back to the original layout. This is used in a script that has 2 or more Go To Layout script steps in it, to take the user back to the original layout when the script was first called upon.

There are times when you need to take ScriptMaker to a particular layout so that it can perform a set of script steps. For example, to use the GO TO PORTAL ROW script step, the portal needs to be on a layout it can be found on when that step is executed. If not, FileMaker simply passes over that step.

COOL IMPLEMENTATIONS OF IT
One of the most simple but yet very cool implementations I've seen is to go to a developers layout in a script. What you do is create one layout in all files that has all the fields and possible portals you use in the file. Then you always go to this layout when executing complex scripts and then use the Go To Layout (original layout) when you are done without any error notification to the user.

Another very cool implementation is going to layout by a calculation. That means you can react to any calculated result before going to that layout. I have a solution that allows a user to determine if they like to go to form view or list view when they go to a different module (such as going from contacts to invoices). I use the Go To Layout (calculated) to go to the layout that user prefers to end up on!

FYI...
It's not enough to take the user to the correct layout/screen. Always make sure they are in the right mode (Browse - Find - Preview).

Got To Know Factor - 8

Here you can see the options for the Go To Layout script step. You can go to a specific layout, a layout in the layout order as defined by a calculated value, go to a layout name by a calculated value or an original layout ( used when you a previous Go To Layout step and you want to go back to where you started).

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Saturday
Aug182007

FILEMAKER: Navigation Steps Listed

The second family of FileMaker script steps are the Navigation Script Steps. Most of the script steps here are used to navigate to a layout, record, field, portal row or mode (other than the layout mode).

Go To Layout
Go To Record / Request / Page
Go To Related Record
Go To Portal Row
Go To Object
Go To Field
Go To Next Field
Go To Previous Field
Enter Browse Mode
Enter Find Mode
Enter Preview Mode

Monday
Jul302007

FILEMAKER: Potential Issue: Script Steps That Need To Enter Into A Field

From Dwayne Wright - www.dwaynewright.com

There are also a number of script steps that need to enter into a field on the
current layout to perform. So in your script, you have to make sure you have a Go To Layout script step to insure that the needed field is there. So more than likely, your script will look something like this ...

Freeze Window (prevents screen flash going between two layouts)
Go To Layout (that you know has the field you need)
Do That Thing (one of the dependent steps mentioned below)
Any Other Steps You Want To Do While You Are Here
Go To Layout (goes back to the original layout

The following script steps (and this list may grow as new versions of FileMaker come out) need to see the field they are working with ...

Copy, Cut, Clear, Go To Field, Insert Calculated Result, Insert Date, Insert Time, Insert User Name, Paste and Replace.

Also the script step of Relookup needs to be able to enter into the parent key field of a relationship to perform the relookup operation.

Generally, you don’t get any kind of error from FileMaker when this happens ( unless you are trapping for it ). So this can be a hard bug to troubleshoot.

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Page 1 ... 11 12 13 14 15