April 26, 200718 yr I'd like to create a button to show/hide fields in a database. I've searched the forum, but could only find conditionals using radio buttons and such. I want to be able to click on a "+" button to show the fields and "-" button to hide the fields. I'm not sure if these buttons should be based on a script or portal. I appreciate any help you can give! Karen
April 26, 200718 yr The easiest method would be to have another layout without those fields and just have buttons that switch back and forth between the two layouts. If that is not feasible then here are some other threads you can take a look at. Visibility Methods Visibility Link 2
April 26, 200718 yr What would be the purpose of this? Normally, a "+" button signifies 'add another one of the same kind'. In Filemaker, that would - in most cases - mean 'add another related record', not 'show another field'. For this, you would use a portal, and you could use "+" and "-" buttons to add/delete related records.
April 26, 200718 yr OT: i think like this even though not a FM trick, view the photo on my site, and click the green lock on the left to show hide details Link
April 26, 200718 yr I think John's reply covers exactly this type of situation. In version 8 and above, you would probably use a tab control object for this.
April 26, 200718 yr karen look at the attached file. The hide and seek of the menu is done with a portal. look at the relationship and the fields. Press the menu button for the menu to appear and press it a second time and the menu disappears. The file is a FM version 6 file. I hope this works for you. Lionel hideandseek.zip Edited April 26, 200718 yr by Guest
April 26, 200718 yr Author I guess I'm too new to this forum...I can open the zipped files but cannot touch them, as it says I do not have access. Robert: I clicked on the link to your website and that is exactly what I want to do! Now, how did you do it Thank you all so much for your replies!! Karen
April 26, 200718 yr Karen You will need to add three field to your database 1)Menustatus (text field) 2) Condcalc is a calculation field. case [isempty(Menustatus;" ","1"] 3) Constant is a calculation field = "1" Make a self join relationship between the fields as Condcalc = Constant Make a portal using this relationship and install the fields you want to hide or show. Add this script to a button for the hide and seek If[Menustatus = 1] set field [Menustatus," "] else set field (Menustatus, "1"] end if This will bring forth the fields with the button is press and hide the fields again when the button is press again or you can automatic it to hide the fields upon exiting with an exit script. Hope this helps Lionel Edited April 26, 200718 yr by Guest
Create an account or sign in to comment