Script problem when 'Export Records' priviledge not allowed
Posted: Thu Sep 15, 2005 3:39 am
FM6 running on local machines with FM Server hosting database.
Hello All,
I have a thorny problem with a script which will not run correctly unless I allow "EXport Records" in the Passwords setup.
Allowing Export Records has become a security issue for the client.
The Script relates to two files, A Company File and a People File.
The People file contains all the people belonging to the respective companies contained in the Company File.
The people are linked to the companies via a unique key number originating in the Company file.
What the script does is to allow a user to find and display all people belonging to any companies they have just
found in the Company file. The resulting people are (and must) be displayed in the People file.
It works as follows:
In the Company file there is a layout called 'Key Util'containing just the Company Key Number field .
There is another layout called 'Key paste' which contains a Global Text field called 'GBLtxt'.
There is a relationship between the Company file and the People file called "All_People" based on the 'GBLtxt' field in the Company file
and the unique key number in the People file (as mentioned above).
The script is as follows:
Set error Capture (on)
Enter browse mode()
Go to layout ("key Util")
Copy All Records
Go to layout ("key Paste")
Paste (Select, "GBLtxt")
Go to layout (original layout)
Go to Related Record(Show, "All_People")
Perform Script (Sub-scripts, External: "People".fp5(*)")
The external script just goes to the relevant list layout in the People file.
The good thing about this script is that it does not involve the editing in any significant way of any records so the script
does not come across any problems with other users being in any records the script wants to use.
The BIG problem is that for some reason this script will not run properly without the Export Records priviledge being allowed. I need to stop this priviledge.
Can anyone help with a solution here which maintains the functionality but allows me to disallow the Export Records priviledge to users?
Sorry to be so long-winded but it's a bit of an odd one and a new one on me.
Many thanks for any help.
David
Hello All,
I have a thorny problem with a script which will not run correctly unless I allow "EXport Records" in the Passwords setup.
Allowing Export Records has become a security issue for the client.
The Script relates to two files, A Company File and a People File.
The People file contains all the people belonging to the respective companies contained in the Company File.
The people are linked to the companies via a unique key number originating in the Company file.
What the script does is to allow a user to find and display all people belonging to any companies they have just
found in the Company file. The resulting people are (and must) be displayed in the People file.
It works as follows:
In the Company file there is a layout called 'Key Util'containing just the Company Key Number field .
There is another layout called 'Key paste' which contains a Global Text field called 'GBLtxt'.
There is a relationship between the Company file and the People file called "All_People" based on the 'GBLtxt' field in the Company file
and the unique key number in the People file (as mentioned above).
The script is as follows:
Set error Capture (on)
Enter browse mode()
Go to layout ("key Util")
Copy All Records
Go to layout ("key Paste")
Paste (Select, "GBLtxt")
Go to layout (original layout)
Go to Related Record(Show, "All_People")
Perform Script (Sub-scripts, External: "People".fp5(*)")
The external script just goes to the relevant list layout in the People file.
The good thing about this script is that it does not involve the editing in any significant way of any records so the script
does not come across any problems with other users being in any records the script wants to use.
The BIG problem is that for some reason this script will not run properly without the Export Records priviledge being allowed. I need to stop this priviledge.
Can anyone help with a solution here which maintains the functionality but allows me to disallow the Export Records priviledge to users?
Sorry to be so long-winded but it's a bit of an odd one and a new one on me.
Many thanks for any help.
David