August 26, 200124 yr Newbies hello -- can someone please tell me how to have a radio box next to a text field that when i select the radio box the text field lets me type into it -- when it's not selected the text box is not active (greyed/faded or not visable?) thank you in advance - JJ
August 26, 200124 yr This is pretty easy if you are familiar with self-links. You need to create a self-link, which is only activated if the radio button is marked, and then drop your text field into a portal. Be careful! Your link-field needs a unique value for each record, or it will link to the wrong record. Here a small example: Field name: Record ID (a unique value for each record e.g. a serial number) Radio (define this to include two values e.g. “Show” & “Hide” Link (a calculation = Record ID & “Show” Link Calculate (Case (Radio = "Show"; Record ID & “Show”; "") Now create a self-relationship between the fields Link and Link Calculation (call it “Show” for example) Now drop a portal onto your layout, and select the relationship “Show” Now drop the field text into the portal Now drop the field Radio onto the layout and define it as a radio button field If you mark “Show” you can enter text into “Text” within the portal. Mark hide and it disappears. You can now make the whole thing tidier by making the portal transparent. Another good tip is to create another field (call it Show Button) and define it as a Text calculation: Case (Radio = "Show"; “Hide Text Field” ; "Show Text Field" ) Now delete the old Radio field from the layout and paste the new “Show Button” field as a merge field into a button. Now you need a script that switches “Radio” on and off If Radio = "Show" SetField Radio “Hide” Goto field Radio (or any other field) Exit Script End If Now you have the following: If “text” is visible, you have a button marked “Hide Text Field” If “text” is not visible, you have a button marked “Show Text Field” This is just a very basic idea – the possibilities are actually endless. However, one of the most powerful aspects of FMP is its ability to use self-relationships. Filemaker without relationships would just not be Filemaker, and self-relationships are essential. Learn them to really get the most from a solution. PS: You could also include calculating containers to offer faded fields or buttons. Hope this helped! Rigsby
Create an account or sign in to comment