April 22, 200421 yr Hello could someone please tell me if it's possible to hide fields. Thanks. Chris. FileMaker Version: 7 Platform: Windows XP
April 22, 200421 yr 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
April 22, 200421 yr User = "administrator" is, of course, a boolean calculation, so the If(..., 1, 0) statement is redundant.
April 23, 200421 yr -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
April 23, 200421 yr Glad to help, Paul, although I should have typed 'test' not 'calculation'. But you got the picture anyway.
Create an account or sign in to comment