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.

PHP Find returning all records - even those not allowed in privilege set

Featured Replies

I have a simple FM11 database of inventory. I have set the Privilege Set's (File>Security>Privilege Set) Custom Records Privileges "View" "Limited" to the calculation "On Web = 1" (without quotes) - where "On Web" is the checkbox field that has the boolean of 1 or 0.

So, if the record has "On Web" checked, the record shows up on the website. All this is working fine, as long as the person enters a variable in the find, but if they just click "Find Records", all the records in the database show up. Here's the kicker - all the records that are are not "On Web" are there, it is just that their contents are blank - so, FM is being literally correct, they are not allowed to "view" the record, but it still includes it in the result - albeit, in a blank row.

How can I get FM to not include these records? The site is at:

http://mobayen.macusa.net/findrecords.php

I hope I am being clear here - only took me 30 minutes to write the two paragraphs above...

I am not a php coder (sorry) - this just may be a bug? Or does something in my method look suspicious?

Thanks for any help

-- Don

Can't tell much without looking at the php code (which we can't see by viewing the site), but it seems like something like:

foreach($records as $record){

	 $checkweb =  $record->getField('On Web');

	 if($checkweb == 1){

		  // your line item display code here;

	 }

}

ought to work.

You really don't need Custom Privilege's to do this.

just adding a criteria that any search also includes 'On Web == 1' in it will do the same thing... As per doughemi, without php code it's hard to say exactly how to implement this.

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.