3 Replies Latest reply on Feb 12, 2015 3:32 PM by philmodjunk

    Access Privileges Error when Performing Find across Tables



      Access Privileges Error when Performing Find across Tables


      Hello, I'm a bit lost with what I hope is a simple issue,

      I have a script that takes a serial number from one database and uses that value to perform a find in another database against that value. Here is an example:

      While in "Repairs" table:
      Set variable $RepairSerialNumber = Repairs::SerialNumber
      Perform Find > Find Records (Inventory::SerialNumber: [$RepairSerialNumber])
      if [Get(FoundCount) > 0], show an alert

      My issue is that, when I attempt to perform this search (again, which searches for values in a different table/database), I get the "9" error code (aka "Your access privileges do not allow you to perform this action"). This seems to be an issue with the fact that I am not in the table that I am trying to search, since I am in the "Repairs" table and am searching the "Inventory" table.

      Is there a way to allow me to remedy this? I've already checked the "Run With Full Access Privileges" box in the script editor with no discernible differences made...

        • 1. Re: Access Privileges Error when Performing Find across Tables

          "run with full access" only grants "full access" to tables defined in the current file. If this is data from another file--such as happens when you employ a data separation model, that script option still does not grant you full access to that data. You'll need to either open that data with a different password granting access or use a "run with full access" script defined in the same file as where this table is defined.

          • 2. Re: Access Privileges Error when Performing Find across Tables

            I'm not sure I follow...I'm a bit new to FM and am not familiar with how Tables interact...
            Is the access issue one that involves the data being from two separate tables, or is it something more vague than that concerning user permissions? If it's the latter, how do I go about doing that?
            Again, this is all contained in a single script at the moment, I haven't changed anything (concerning the tables/databases) with respect to the access privileges...

            • 3. Re: Access Privileges Error when Performing Find across Tables

              Keep in mind that I don't know the design of your database nor what accounts you may or may not have set up for users in Manage | Security.

              What I've stated in my last post is to document a known limitation of the "run with full access permissions" option you might specify for a script. If the table is defined inside the same file as the script. (Any such table will be listed in Manage | Database | Tables), this option will allow your script to access the data in that table just as though a person with full access permissions had opened the file so this is a way to enable a user with limited access to perform a task that would not otherwise be possible for the table in question.

              But this only applies to tables defined in the same file. A table can be set up in a different file and an external data source reference can allow the first file to access data in the second. But what ever limits on that access apply to the current user will be controlled by Manage | Security settings in that second file. In such cases, you will find a table occurrence "box" for that table in Manage | Database | Relationships, but not in Manage | Database | tables. The box's name will dispaly in italics to show that it has an external data source and you can see the name of the file from which the data comes if you hover the mouse over the arrow in the upper left corner of that box. If the data is from a table from a different file, "run with full access privileges" will not have any effect on whether or not the data in that field can be accessed. The setting in manage | Security still apply.

              It may be a frustrating limitation for your current issue, but it's a matter of security. If "run with full access" applied to other files, a ill intentioned person could craft a database file with a script that made all manner of unauthorized changes to data in a file to which they do not have legitimate access.