Hide records
from Web users

Chong-ho (Alex) Yu, Ph.D., MCSE, CNE

Problem:

I maintain a database of project participants. Some participants have dropped out from the project. I want to hide those records from the Web users but still want to retain them in the File Maker Pro (FMP) database.

Solution:

First, create a calculation field named "flag" to indicate which users are hidden. Assign every record a value of "1" by using the function IsValid with a key field such as User ID, except the records that you want to exclude. The exclusion can be performed by unmatching the user ID (The "not equal" sign used by FMP cannot be shown on the Web. Please subsitute "<>" with the "not equal" sign in FMP) .

	If(IsValid(user_id) 
		and user_id <> "alexyu"
		and user_id <> "sandy"
		and user_id <> "david"
		and user_id <> "sam"
		and user_id <> "angel"
		and user_id <> "tara"
		and user_id <> "frank",
	1, 0)

In the file "search.html", add an hidden input for "flag" and set the default value to "1" along with other hidden fields. By doing so any submitted search must meet the criterion of "flag=1" and thus those records that are "flag=0" would be skipped.


	<input type="hidden" Name="flag" value="1">

Last, disable the default "Find All" by simply erasing or commenting out the option "-FindAll" from "search.html." And then create your own "Find All" by confining the search within "flag=1." From now on those records could not be searched on the Web.


	<!--<INPUT TYPE="submit" NAME="-FindAll" VALUE="Find All Records">-->
	<B>Find all records:</B><p>
	<INPUT TYPE="hidden" NAME="-op" VALUE=eq>
	<INPUT TYPE=checkbox NAME=flag VALUE="1">

Navigation

FMP Tips Contents

Other computer tips

Search Engine

Credit/Copyright ©

Simplified Navigation

Table of Contents

Contact Me