Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Record Omission - special case

Featured Replies

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

What is the purpose here. If its a security issue then you should be using record level access under: Manage --> Security.

  • Author

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

  • Author

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

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.

  • Author

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

Search for star * in the primary ID field. I would recommend using a custom menu set to over ride the show all command.

  • Author

Many thanks. :-)

  • 2 weeks later...
  • Author

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.

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.

  • Author

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?

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.

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

  • Author

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.

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.