RoadrunnerRay Posted April 1, 2010 Posted April 1, 2010 I am having a problem with the script below. It executes fine when there are no data entry errors. I have set Error Capture Off to allow FileMaker to detect fields that were defined to have a required value. After I enter the data (leaving a field blank) and click "Continue" it presents the standard FileMaker "Revert Record Yes/No" message and pauses. When I select "No" it places the cursor in the empty field. After entering the data and clicking "Continue" it does not return me to the script to enter the department. How can I return to the script to complete it?? Thanks for any assistance. Create New Participant Record #Setting "Allow User Abort" to Off removes the cancel button when a script pauses. Allow User Abort [ Off ] #Set "Set Error Capture" Off Set Error Capture [ Off ] #Select layout for new participant record Go to Layout [ “Participant Form New Registration Part-1” (Web_TA_Participant_DB) ] Enter Browse Mode New Record/Request #Set Department field to "Select Department" Set Field [ Web_TA_Participant_DB::Department; "Select Department" ] #Enter the participants demographic data with the exception of the department. Pause/Resume Script [ Indefinitely ] #Select department for new Participant record Go to Layout [ “Participant Form New Registration Part-2” (Web_TA_Participant_DB) ] Pause/Resume Script [ Indefinitely ] Go to Layout [ “Participant Form” (Web_TA_Participant_DB) ] Enter Browse Mode Show All Records Adjust Window [ Resize to Fit ]
jamesducker Posted April 1, 2010 Posted April 1, 2010 The field validation options are a bit of a blunt instrument and, whilst they always do what they say on the tin, they don't always give you the desired result, especially if they interrupt the smooth running of a script. If the only way your users can enter data in these fields is by calling your script, I'd suggest DISABLING the field validations and doing the same validation in the script. A good method is: Loop Go to field [x] pause/resume script exit loop if [x ≠ "" and length (x) > 7 //or whatever] display dialog "Field x must be at least 7 characters long' end loop Hope that helps. James
RoadrunnerRay Posted April 5, 2010 Author Posted April 5, 2010 Hi James, many thanks for your suggestion and sample scripting. The field validation is also used in my XSLT web pages and works OK. I will look into disabling field validation (which I never really liked to begin with) and using your suggested scripting for both the network users and the web users. When completed, I will report back with the details........Ray
Recommended Posts
This topic is 5346 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now