chris_brown Posted April 22, 2004 Posted April 22, 2004 Hello could someone please tell me if it's possible to hide fields. Thanks. Chris. FileMaker Version: 7 Platform: Windows XP
dubl Posted April 22, 2004 Posted April 22, 2004 Hi Chris I am guessing that the same trick for hiding fields in v6 will work for v7. Say you have a price field, which you only want to be visible when a user is an administrator and you want hidden for other users. In the user file, you have a checkbox if the user is the administrator. In the file where you want to hide the field, create a calculation field (call it Hide) that is something like: If(user = "administrator", 1,0) - which says that if the user is an administrator, the value of this calculation is 1 - if not an administrator, the value will be 0. Now, if you dont already have one, create a 'Constant' calculation, where the value in the calculation is simply a " 1 " - in other words, for every record, this constant calc will ALWAYS have a value of 1. Now create a relationship between Hide and Constant - the relationship will be valid if both fields have a 1 in them - which will only occur when the user is an administrator. Lastly, create a portal which only has one row, with no fill or border (altho it might be easier for testing, to give it a colour border and make it transparant later). This portal is set to the above relationship. Now, any fields placed UNDER the portal will be invisible when the user is not an administrator. I hope you can apply this example to your own situation - and if v7 has a quick and easy way to hide fields, then all I can is - About Time!!!1
-Queue- Posted April 22, 2004 Posted April 22, 2004 User = "administrator" is, of course, a boolean calculation, so the If(..., 1, 0) statement is redundant.
Damocles Posted April 23, 2004 Posted April 23, 2004 -Queue- said: User = "administrator" is, of course, a boolean calculation, so the If(..., 1, 0) statement is redundant. Thanks, Queue! I've always stumbled on the boolean field definition vs. the If statement, and that simple statement just cleared it up. Just thought you would want to know that I heard an audible "click" as I read that! Paul FileMaker Version: 6 Platform: Windows XP
-Queue- Posted April 23, 2004 Posted April 23, 2004 Glad to help, Paul, although I should have typed 'test' not 'calculation'. But you got the picture anyway.
Recommended Posts
This topic is 7519 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