Search Project Mgmt
Search FileMaker Blogs
Friday
Sep142007

Navigate Portal Rows Via Buttons

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

In this example, we show a very easy technique of moving from one portal row to the next via buttons. On the surface this seems to be a very trivial example but it does show that you can control FileMaker's ability to navigate portal rows. This can become very helpful as you start to build larger and more complex scripts and interfaces.

In the example we have 5 buttons which are First, Previous, Next, Last and Go To Row Number. We show a portal listing the seasons of the year which are Spring, Summer, Fall, Winter and Football. The last is my favorite, I must say.

The first four buttons are not even attached to a script. You can define a button go to these portal rows directly via the button choices. Originally, this example used the go to portal row by field. During conversion to FileMaker 9, this was automatically updated to Go To Row By Calculation. Going to a portal row by the contents of a field can be scripted. This is exactly what we did. All you need to do is choose a portal row number from the value list and click the button next to it.

I also added a button called Go To Row Dialog. This will bring up a dialog box allowing you to manually enter in a portal row to go to.

I only added one tweak that is a little off of the beaten path. If the Portal Number field is empty, the script brings up a dialog box asking what portal row you want to go to . The script looks like this ...

If [

IsEmpty(Portal_Number)]
Go To Portal Row [ Select By Number ]

Else
Go To Portal Row [ Select, "Portal Number"]
** which is the name of the field **
End If

The final thing we did was add another layout that uses a similar relationship but it can create new related records on the fly. You can get there by clicking the View Add Related button. From here, you can add a season to the global field and click the add new season button. This goes to the last row in the portal ( empty waiting to create new related records ), sets that field equal to the global, sets the global to empty and exits the record.

An example file can be downloaded by clicking (here)

=
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.

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.

Page 1 ... 10 11 12 13 14