AnsweredAssumed Answered

Script Triggers in Instant Web Publishing

Question asked by Eohat on Apr 29, 2010
Latest reply on May 17, 2010 by mps1773


Script Triggers in Instant Web Publishing

Your post

Hi everyone,


I previously posted this in the "Using FileMaker Pro" forum, and thought I would give this area a try as well (since it is a Server issue as opposed to a client issue):


I am very new to FileMaker Pro.  I am using FileMaker Pro 11 on Windows Vista OS. 


I have designed a tracking database with 4 layouts.  Of the 4 layouts, there are multiple Date fields which needed additional formatting for data-quality control.  I set up scripts "on object save" such that if the date was below 01/01/2010 or above 01/01/2020, show a dialog box stating that the date is not within a reasonable range, please check source; and then to clear the field.  You can see my script below:


If[IsEmpty(Enrollment Tracking::Consent Date )]
 Halt Script
 If [ Enrollment Tracking::Consent Date<Date (1;1;2010) or Enrollment Tracking::Consent Date>Date (1;1;2020)]
  Show Custom Dialog["Date is out of range.  Please check source."]
  Clear[ Enrollment Tracking::Consent Date]
 End If
End If


This runs fine in FileMaker Pro client version, but unfortunately we will be doing data entry in Instant Web Publishing (which I was not aware of while designing the database.)  I know that custom dialog boxes are not supported under IWP, so that statement has been removed.  In researching how to get scripts to run, I found this statement:


In Instant Web Publishing and Custom Web Publishing, script triggers can only be activated by a script and not by direct user interaction. For example, if a user tabs into a field that has an OnObjectEnter script trigger, the trigger will not activate. If a script step causes focus to move into that field, the script trigger will activate.
I am not exactly sure how this works, i.e. how would I set up a script to activate the script triggers within my database?
Also, is there any other way to display an error without using the custom dialog box?

Thank you in advance for any help that can be provided!