Search Project Mgmt
Search FileMaker Blogs
FileMaker Blog
Thursday
Jul262007

FILEMAKER: Allow User Abort Script Step

From Dwayne Wright - www.dwaynewright.com

There are times that the integrity of a FileMaker database can be damaged if a script is not allowed to run it's complete course. For example, a script may import a set of records, the process them, perhaps delete a few of the records and export them to some other area. If you aborted the script in the middle, you may have some unprocessed records, some records you don’t really want and your operations dependent upon the export are crippled for that day.

Although there is no menu item to abort a currently running script, FileMaker has a keyboard shortcut for both Macintosh and Windows machines to get you out of a running script.

FYI... The keyboard shortcuts for aborting a currently running script are the esc (escape) key for Windows users and command-period key combination for Macintosh users.

The Allow User Abort via its on or off setting, either allows or does not allow the end user to cancel out of a currently running script. The On position will allow that user to abort the script while it is running and the OFF position will not allow that user to abort.

COOL IMPLEMENTATIONS OF IT
Using get functions, you can see what privilege set level was used to open the database. Then, if they are designer, allow them to abort. If they are a standard user, do not allow them to exit a script unless it is complete.

FYI...
If you have a long script that you will not allow the user to exit from, warn them first. The best way to do this is using another FileMaker script step called Show Message. You can warn the user that the script may take a long time to run and allow them to abort it's execution BEFORE it gets started.
Normally, you will want to have this script step as close to the top of the script as possible. Otherwise the user could abort the script before the script comes to the Allow User Abort step is reached in the script.

ALLOW USER ABORT AND IWP
FileMaker Instant Web Publishing supports more than 70 script steps! When the Indicate Web Compatibility checkbox is checked, all incompatible script steps are dimmed! If a script contains IWP unsupported scripts steps and it is executed under IWP, you can use the Allow User Abort script step to manage the effects. If the Allow User Abort step is in the ON position, the script will stop when it encounters the unsupported step. In the other position, which is the OFF position and the default for FileMaker, then IWP will pass-over the unsupported script steps and execute the rest of the script. If there is no Allow User Abort script step in the script, IWP will halt the script at the first instance of an unsupported script step.

Got To Know Factor - 8

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

Wednesday
Jul252007

FILEMAKER: Potential Issue: Copy & Paste Script Steps

From Dwayne Wright - www.dwaynewright.com

The Cut and Copy script steps will replace the contents of the computers memory (many times called the clipboard). So if your user is going back and forth between FileMaker and Microsoft Word, they may get something unexpected when they use their PASTE command in Microsoft Word.

You can do a workaround for the memory replacement issue. It would involve pasting the contents of the clipboard into a global field, performing your cut, copy or paste script steps, come back to the global field and copy it’s contents back to the clipboard. This would be ok except if the clipboard held data such as a picture, sound, movie or other data a text formatted global field could not handle.

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

Wednesday
Jul252007

FILEMAKER: End Loop Script Step

From Dwayne Wright - www.dwaynewright.com

Every loop goes to a particular point and then decides to either end ... or ... go back to the top of the loop. The End Loop script step is an indicator to FileMaker where the loop needs to end ... or ... loop back to the Loop script step to run the set of steps again.

Got To Know Factor - 8

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

Sunday
Jul222007

FILEMAKER: The (Exit Loop If) Script Step

From Dwayne Wright - www.dwaynewright.com

Used to determine what set of conditions need to be met to exit out of an established ScriptMaker looping routine. This is based upon using the calculation dialog box to establish those “end loop” parameters. Here is a brief example

Go To First Record
Loop
If (this record has this quality)
Set This Field Equal To That
Else
Set This Other Field To Something Else
End If
Go To Next Record
Exit Loop If The Next Record Has (this, that or the other quality)

HOW IT IS USED
All loops need to have a way to exit out of the loop. Loops normally will go from record to record ... or ... field to field in a particular record. In either case, the Exit Loop can be used to exit the loop based upon any calculation such as ...

Customers Name, Address, Payment Status, etc...
The current record contains duplicate values, unique values, etc...
Counter ( using a method to increment a global ) has reached a value of ...

It is also possible to have loops inside of loops. The Exit Loop If script step is one of the most popular ways to exit out of sub-looping routines based upon a fulfilling a set of criteria.

COOL IMPLEMENTATIONS OF IT
There are some cool ways to have FileMaker count. You can have an Exit Loop If step activate when the counter reaches a predetermined number.

Got To Know Factor - 9

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

The FileMaker Loop Script Step

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

FileMaker loop scripts will cycle  a  set  of  script  steps  over  and  over  again  until  it  receives  an  indication  to  exit  the  loop.  Scripts  with  loops  are  one  of  the  main  ways  to  have  FileMaker  perform  tedious  tasks  on  a  set  of  records.  Not only can they save time from performing tedious tasks, they also can ensure the data being processed is in the same format. Many times doing repetitive and redundant data entry, the data entry person will make a mistake strictly out of boredom.

The most common ways to exit a script loop include...

Exit Loop If Script Step - allows you to use a calculation to exit the loop

Go To Record [ Next, exit after last ] - exits the loop after the last record in a found set

IF script step - put into the loop to run the Exit or Halt script step. However, this method is a little sloppy and normally means the developer wasn’t aware of what the Exit Loop IF script step was for.

HOW IT IS USED
Usually a loop statement will also include the "Go To Next Record" script step. In most scripts it is START LOOP, PERFORM ACTION ON A RECORD, GO TO NEXT RECORD (exit loop if you are on the last record, END LOOP.

COOL IMPLEMENTATIONS OF IT
I guess the first cool implementation I saw as in a solution that deleted duplicate records. The script would find duplicate records, sort them by the duplicate criteria, the loop through each record keeping the first new instance but deleting all the following duplicates.

Got To Know Factor - 9

=
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 ... 12 13 14 15 16