7 Replies Latest reply on May 26, 2009 12:25 PM by LaRetta_1

    Scripting Problem



      Scripting Problem

      Description of the issue

      This is now the second time I have had a problem with a script in filemaker that simply stopped working after a period of time. This makes me very nervous to use this software, because the scripts work for a time and then just stop. The first time I encountered this problem, I simply re-created the script and the new script worked again as its predecessor had, and it has been working ever since. The new problem is with the most basic of scripts. All the script does is a "Perform Find" which is run "OnLayoutLoad" to Omit all the records that return a "No Access" in a particular field. Just to clarify, my users have unique logins, which allow them to see only certain records in a table. When I set priviledges for these accounts so that they could not view records they should not view, they all still show up for some reason but say "No Access". I would prefer if they did not show up at all, but since they do I created the simple script that runs on the load to omit all of these unwanted "No Access" records. This script worked for almost 2 months with no problems. Suddenly it would not work at all. I recreated the script which now works for the users on the Client, but does not work when accessed via the web interface. I also noticed that sometimes that the first couple times I re-created this script, it worked on the client UNTIL I tried to access the layout via the web interface and then the script completely stopped working again. This is very frustrating, especially since the script is only this 1 command. It is sometimes difficult to explain problems, so hopefully this is somewhat understandable.

        • 1. Re: Scripting Problem

          I do not understand this at all.  If a field produces the Accounts & Privileges <no access> then, AFAIK this is not field data and a search can not be performed for it any more than it can be performed for <table missing> on a field.  <No access> and <table Missing> are displays not data.


          You simply are not providing enough information.  We need to see your script.  But I can assure you that for 'script to suddenly just stop working' is NOT normal and you should not be nervous about using this software because of an issue like this. You instead just need to understand why it breaks - big difference.:smileyhappy:


          BTW, do you have the script checked to 'run with full privileges'?

          • 2. Re: Scripting Problem

            The script is as followed:


            Perform Find [Restore]


            Thats all there is to this script.


            The complete story behind this is, that I have setup Accounts & Priv so that when a user signs in they see only the records they have permission to see. By doing this, all records they DO NOT have permission to see show up in the database as <No Access>, but they are all still there. So if I have 1000 records and a particular user has access to 5 of them, that user must sort through 995 <No Access> records to see the 5 they need. Because of this, I have setup this simple script to OMIT all of these <No Access> records so that when the user logs in the 995 are omitted from view, and they only see the 5 they need. As I said, this very basic 1 line script did work, but now it does not.


            I would love it, if just by setting up Accounts & Priv to specify which records a user has access to the records that user did not have access to just did not show up at all when they log in, but for some reason with FMP these records still show up, and let the user know that there is a record here, but you do not have access to it. Perhaps there is a way to do this, but I have not found it.


            Another note, when I click "Modify Last Find" the criteria for the search in the script is in place and I can then click perform find and it works. It makes no sense to me. :o(

            • 3. Re: Scripting Problem
                 Oh sorry, and yes the script is running with Full Priv.
              • 4. Re: Scripting Problem
                   Just another note, and to prove to myself that I am not crazy. I have two copies of the database. EXACT COPIES. I have not made any changes. One the script works on the client but not the web interface. The other the script does not work on the client or the web interface. I made two copies of the database and simply began logging into each with the same user account repeatedly.  Eventually the script stopped working on one of them, it is still working on the other for now. When I log in, I am not changing any data or anything, just logging right back out.
                • 5. Re: Scripting Problem
                     uhmmmmm.... If you run the script with Full Access, then it will run it as "[Full Access]" which in turn will show you all the records since during the period of the script you have access. However, since you dont have access to display the fields, you will still see <No Access>
                  • 6. Re: Scripting Problem

                    DSM wrote:
                    Perform Find [Restore]


                    Thats all there is to this script.

                    No, there is also the restored criteria. Without knowing what they are, the discussion is rather ineffective.

                    • 7. Re: Scripting Problem

                      Comment said, "No, there is also the restored criteria."


                      Hmmmm, I thought the 'restored criteria' was simply the <No access> which was omitted ... which simply can't be (from what I can tell).  Clearly it was said, "to Omit all the records that return a "No Access" in a particular field." 


                      It sounds like the restored criteria is 'what would make records 'no access' and that surely makes more sense.