2 Replies Latest reply on Oct 30, 2014 11:50 AM by john@outdoorflooring.ca

    cannot get last error to be captured or displayed

    john@outdoorflooring.ca

      Title

      cannot get last error to be captured or displayed

      Post

      Hi I cannot get the LastError to be captured or displayed on this layout. I have used this 100's of times and for some reason I am not getting the error number. I wish to overide a validation error internal message. and replace it with a "Show message" and more actions from my script. By the way how can I copy the script text to past in this window to show you?

       

      Thanks JWS.

       

      FMP_script_example.png

        • 1. Re: cannot get last error to be captured or displayed
          philmodjunk

          Get ( LastError ) only reports on script step immediately previous to it. So unless Commit Records is what causes the error, your script won't detect any error as currently written. And I don't see any reason why commit records could possibly generate a 505 error code here.

          To post a script to the forum:

                 
          1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
          2.      
          3. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
          4.      
          5. If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
          6.      
          7. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
          • 2. Re: cannot get last error to be captured or displayed
            john@outdoorflooring.ca

            Hi There you are always a big help. I have a field set to be validated by matching a value list. I thought that would generate an error code 505 then i could have the following line of the script guide the user through the appropriate steps. I guess I need to do a find in the table where I need to establish if there is already a record with the same name. The result I want is to guide the user to enter a new company name (and all of it's attriburtes, address, tel number etc.)  in a related table. If the name exists the drop down menu should provide them with the name, if it does not exist then i want them to go to the company table and enter the new information.