Wednesday
Sep302009

FILEMAKER: The ScriptMaker Search Field

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

CHAPTER 01: Introducing ScriptMaker

The ScriptMaker Search Field feature added with FileMaker 9 is so subtle, it is often overlooked. There was a small search box added in the upper right corner in ScriptMaker (named Manage Scripts in FileMaker 10) and allows you to search for scripts by a particular name.

Here you can see the Manage Script dialog box with the small search box highlighted. Notice that all the scripts are hidden in closed organization folders.

Here you can see the same dialog box and the term “gtrr” added into the search box. Notice how the the script folders holding scripts with that word are show and the folders are expanded.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Thursday
Sep242009

FILEMAKER: Go To Next Record Failure

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

CHAPTER 04: Navigation Script Steps

Nothing ground breaking here but I wanted to share how a looping script, set error capture and validation have to be tweaked properly to work in concert correctly.

I just imported 1,200 + questions that I used in my online FileMaker crossword puzzles into the engine I use to create quiz questions. These questions will need to be edited because they have only one answer, the one you put into the crossword. A quiz record needs to have multiple possible answers and then an indicator of which one is the correct answer. So when I imported the data, I imported the correct answer for all the records into the answer A field. So I had over 1,200 questions that all had the answer A as the correct choice.

I wrote a script to help with this cleanup process. Basically, I wanted to shuffle the answer from the crossword into either answer A, answer B, answer C or answer D position. The table does have validation set up for me to enter in the difficulty level of the question. The current version of the quiz doesn’t have a difficulty selection option but will in the next release. In fact, it might already be there by the time you read this.

I also had turned on the Set Error Capture and I really don’t know why. Anyway, because of the validation in the table and the Set Error Capture On setting, if I didn’t commit the record before the Go To Next Record command, it simply didn’t go to that record. I had placed the Commit Record step on each step except for when I passed over the first answer A option.

When my script was done the first time, everything looked great. Quickly I realized I had zero answer A options because my Go To Next Record wasn’t firing due to the validation / Set Error Capture combination settings. The quick addition of the Commit Records step in the pass over for answer A fixed the problem.

Here are some links to other posts that might be of interest in regards to this topic...
The Set Error Capture Script Step
Go To Record / Request / Page Script Step
Introducing Field Data Validation
Validation Failure Messages To Users
Calculated Auto Enter, Calculated Validation And Calculated Replace
Potential Issue: Imported Data And Validation
Validation Feedback Option
Range Validation
Member Of Value List Validation
Custom Message When Validation Fails
Validation Override
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.


Stretch your FileMaker knowledge muscles daily with InBizness Quiz - FileMaker Edition! For more information, click here!

Wednesday
Sep232009

FILEMAKER: Are There Any Problems Records In The Found Set?

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

CHAPTER 15: Intermediate Script Design

As you might now, I’ve got a FileMaker based quiz product out there called InBizness Quiz - FileMaker Edition. I have two files in this solution, one is my workshop and one is the public version. In my public version, I have almost 300 different questions for users to try and conquer. In my workshop copy, I have another 800 questions or so that I’m tweaking, editing and then partially posting every day.

I wrote a script that will allow me to quickly post a found set of workshop questions to the online resource. I built a subroutine in the system to find any records that might be a problem before I post the found set. This is like an automated double check in case my caffeine levels are dangerously low. My goals were to show all the potentially problem records in a found set, deal with them and then move on towards the batch upload.

Here you can see the script I built and the error capture subroutine is highlighted in blue. By pulling up a new window, I have a duplicate of the found set that I’m wanting to post. I do a constrain find to locate any problem records. If I find some, I give myself a message alert and then clean them up these records in the new window. When done, I close that window and try to do the batch upload again. If no errors were found, my batch just runs!

Nothing too spectacular but I thought I’d share this example of checking your batches in a new window before execution.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Sunday
Sep132009

FILEMAKER: Subsummary Layout Parts For Dynamic Entry?

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

APPENDIX 2: From Around The Net

According to ISO tutorial video "User Friendly Finds", showing a sub-summary layout part as a hidden input option has been around since FileMaker 3 ... really? Never saw that before! Later on the in the same video, it is mentioned that the user needs to be on the first record of the found set in order for this to work properly. Interesting!

If you are interested in more quality tips like this, check out FileMaker Magazine at http://www.filemakermagazine.com/ and subscribe today.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Thursday
Sep102009

FILEMAKER: Set Field By Name

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

CHAPTER 06: Fields Script Steps

The Set Field script step has been a fan favorite of every FileMaker developer and this particular developer is no exception. Both the Set Field and Set Field By Name script steps have the same two basic settings, what field do you want to set a value into and what is that value. The new FileMaker 10 release, Set Field By Name step allows the savvy developer to use their calculation skills to determine which field to update. This allows for more flexibility in a well crafted script and sometimes it is all about the flexibility.

What if you don’t know exactly what field you want to set in a script because the conditions of the record itself varies? If a record has this combination of values, you need to set this field. Otherwise, this other field needs to be set to something else. This type of conditional decision making happens all the time as a database solution evolves in complexity. Having the ability to use a calculation to make the decision which field to update is the new and shiny feature of the Set Field By Name script step.

SO WE HAVE TO TALK ABOUT THE POTENTIAL PROBLEM
You have created a wonderful script that is performing admirably for all your users. One day, you listen to a podcast or read an article that enlightened you to a naming convention for fields, tables and scripts that simply knocks your socks off. In the heat of development battle, you make some changes to the way your fields are named.

Now your cleverly crafted script with loads of Set Field By Name steps is likely broken to the core. It is not that it cannot be fixed but it can be an unexpected problem if you didn’t ... um ... well ... expect it.

There are techniques that we often call subroutines. The script itself does a double check to make sure it has the field names are correctly identified before applying them to a Set Field By Name command. In fact, a new FileMaker 10 function, GetFieldName can be part of that subroutine process.

The particulars of those subroutines is beyond the scope of this article but do not allow that to stop you. I hope to write more about this in the future as I explore the topic further myself. If you stumble upon a great article about the topic, please forward the link to me, won’t you?
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - 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.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html