hard to imagine why the show custom dialog has anything to do with it. What error does the "open URL" generate when it fails?
The Open URL does not do anything with a Show Custom Dialog is added at the end. The Hit counter increments by 1 and the Show Custom Dialog displays.
I agree that it is hard to imagine that the Show Custom Dialog is causing an issue in this script, but I am convinced that it is. I'm puzzled...
If you have Script Debugger and go through this script, does the Open URL work?
Script Debugger shows no errors.
I would try erasing the Show Dialog box and re-entering it. Or completely remake the script. Also, are you on the current version of FileMaker and a current OS?
I completely rebuild the script from scratch and still have the same issue. I tested this on FM Pro 12 and FM Pro Advanced 12 on Win7 and XP.
Put a couple second pause before the Show Custom Dialog.
Then see if it still giving an error.
- Go to Layout [ “Open Local” (Local) ]
- Show All Records
- Go to Record/Request/Page [ First ]
- If [ Local::Added DB ≠ "" and Local::Added DB Path ≠ "" and Local::Added DB Option = "Yes" ]
- Open URL [ Local::Added DB Path ] [ No dialog ]
- Insert Calculated Result [ Local::Hits; Local::Hits+ 1 ] [ Select ]
- End If
- Go to Record/Request/Page [ Next; Exit after last ]
- End Loop
- Pause/Resume Script [Duration (seconds): 3]
- Show Custom Dialog [ "test” ]
Last Error: 101
I received an error when I added the pause. Error 101 description is "Record is missing"
That's because of the Exit after Last.
I don't use that "feature" because of the error. Use an Exit Loop If and come up with appropriate calc. I like to test for Get ( FoundCount) = Get ( RecordNumber ), because once you have done your other tasks, now exit as this IS the last record.
-- sent from my iPhone4 --
What behavior are you expecting that you're not actually getting? What indicates that the Open URL is failing?