Greg Hains Posted May 23, 2012 Posted May 23, 2012 Hi. I have a scenario that I cannot quite resolve and would like to know if anybody can point me in the right direction please. I have a table with a list of about 500 clients and a unique ID for each. I need some of those clients hidden (by omission) to certain users (logged in) when browsing lists. Currently I have a global variable with the ID of one or more clients in it, and as the list is opened, if the variable is not empty, then it runs a loop from record 1 to n omitting each record that meets that pattern. It works OK, but as I have several ways of manipulating that list (Live Search etc), it's become a headache to ensure that omission script is run at the right time and not mucking up the other process running. Is there an easier way to do this please? Greg
mr_vodka Posted May 23, 2012 Posted May 23, 2012 What is the purpose here. If its a security issue then you should be using record level access under: Manage --> Security.
Greg Hains Posted May 26, 2012 Author Posted May 26, 2012 Hi John, Thank you for this. To be quite honest, I had never ventured into record level access - only scripts and layouts etc. This will solve my problem. Cheers, Greg
Greg Hains Posted May 29, 2012 Author Posted May 29, 2012 Hi John, Further to this... How do I display a list of records, excluding those to which I have no access? I would use a Find, but not sure how to search only for records where Get(RecordAccess)>0. I wan thinking of a calculation field that was not stored, but that is self-defeating. lol Cheers, Greg
comment Posted May 29, 2012 Posted May 29, 2012 Any find will automatically exclude records the user has no access to. The thing to watch for is 'Show All Records' - you don't want your users to have access to that. Of course, they won't be shown anything they are not supposed to view, but the result - a bunch of 'No access" records - can be rather ugly.
Greg Hains Posted May 29, 2012 Author Posted May 29, 2012 Hi Comment, ( my regular saviour... :-) ) I do use Show All Records in my scripts, but would normally apply a Find *after* that to limit any records. What would be the best "dummy" find to use to list all records for a user - excluding No Access ones - because basically I want to see all records other than the No Access ones. Its probably a silly question... Greg
mr_vodka Posted May 30, 2012 Posted May 30, 2012 Search for star * in the primary ID field. I would recommend using a custom menu set to over ride the show all command.
Greg Hains Posted June 13, 2012 Author Posted June 13, 2012 Good evening. I have found an additional aspect of this problem. What if I need to show all records that the user is allowed to see (Find * works fine) as well as limiting another field. I see that the Find * tends override the other filter - even with a New Record/Request in the script doing the find. How would I incorporate another find at the same time excluding the <no access> records? Thanks.
comment Posted June 13, 2012 Posted June 13, 2012 Not sure what you mean by "limiting another field". As mentioned earlier, any find will automatically exclude all records to which the user has no access.
Greg Hains Posted June 14, 2012 Author Posted June 14, 2012 Hi Comment. How does a "Show All Records" differ to a "Find *" in terms of <No Access> records? I don't doubt your expertise at all, but have found with my solution here that if I want to display only client records that have a pattern of "john" in one of two fields as well as exclude <No Access> records, then I run into problems. The "Find *" command on it's own works fine - does what it's supposed to, but I need to display the "john" records as well as hiding <No Access> In the past when I have searched for multiple criteria then I enter Find mode, insert criteria into one field, New record, insert criteria into next field then Perform Find. I can seem to use this method. Should I be employing it a certain way?
mr_vodka Posted June 14, 2012 Posted June 14, 2012 As comment has already pointed out many times, ANY find whether finding for 'John' or using a '*' to override the Show All records command will omit the No access records. You should be able to use your old find method. The reason I talked about finding with * in your ID field is only for the purposes of overriding the Show All Command.
comment Posted June 14, 2012 Posted June 14, 2012 To illustrate further, let's have sample data: NAME, ACCESS John, Yes John, No Mary, Yes and a user that has no access to records where ACCESS = "No". When this user calls Show All Records, they'll see 3 records: John <no access> Mary A find for * in the NAME field will produce a found set of two records: John Mary and a find for "John" will find one record only: John 1
Greg Hains Posted June 15, 2012 Author Posted June 15, 2012 Hi guys. Sorry to be frustratingly dense, but I was getting mixed results. Perhaps its better to steer clear of Show All Records then? I will play the FInd game and see how I go. Thank you again for your help.
mr_vodka Posted June 15, 2012 Posted June 15, 2012 Not sure what your issue can be. See this demo. I did it as an fp7 file so that those that are not on 12 can make use of it. * Note - This overrides the custom menu for the Show All command. Also, when the file first opens it will open with the default Admin account with [Full Access] privileges. LockingRecords_ShowAll.zip 1
Recommended Posts
This topic is 4544 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now