4 Replies Latest reply on Dec 11, 2014 5:03 AM by birdseyedavis

    Using a Radio Button to Hide or show other fields

    birdseyedavis

      Title

      Using a Radio Button to Hide or show other fields

      Post

      I have a data base where I am collecting info on pipes coming and going from a Sanitary Sewer Man hole. Fun I know!

      Each Man hole will have different amount of pipes coming and going so I wanted to create a radio button for each potential pipe and then hide or show the fields below if the radio button is unchecked.

      I noticed there is a "Hide If" option on the Field Inspector but I don't know how to write to calculation.

      See the attached images.

      thanks in Advance,

      Larry D.

      Doc2.jpg

        • 1. Re: Using a Radio Button to Hide or show other fields
          philmodjunk

          I would set up a related table of records with one record for each pipe linked to a table of manholes such that a portal on the Man hole layout lists all of the pipes for that man hole. That can be a much more flexible way to work with this data.

          But if you want to use the value in a radio button field to control whether or not an object is visible:

          Say you have a field named YourTable::RadioButtonField with values that enter values of "yes" and "no".

          Then this expression in the "Hide Object When" setting in the Inspector will hid the object if the "no" value is selected:

          YourTable::RadioButtonField = "No"

          • 2. Re: Using a Radio Button to Hide or show other fields
            birdseyedavis

            Instead of using a yes no radio button I just created a yes no drop down menu and made it hide the fields below if the answer was no.

            I think this will work just fine.

            The only problem will be if somebody accidentally hits some of the fields and populates them and then says  no to the pipe being present. At that point the fields would be populated and hidden which is probably not a good thing but I am learning and this will give me what I need. I could have made a table with all the pipe data in it but I am not knowledgeable enough yet to do portals or relationships.

            Thanks a lot for your help.

            I look forward to learning more about this powerful peace of software.

             

            Larry

            • 3. Re: Using a Radio Button to Hide or show other fields
              philmodjunk

              Using FileMaker without using related tables and portals is like attempting to row a row boat with only one oar. FileMaker is called a relational database system for a reason after all. wink

              • 4. Re: Using a Radio Button to Hide or show other fields
                birdseyedavis

                Yes Sir I agree! Nice analogy by the way!  I jumped in without knowing how deep the water was. So now I need to back up and learn how to create a good relational database. I have another project that I think will be great for learning that on (although I think I will purchase a good FM Pro book first). I am looking at making three tables, I guess thats what I am going to do. One with a daily quantity from a site inspection in the construction industry, lets say 200 feet of curb and gutter installed, 500 sq. ft of sidewalk installed, 1 catch basin installed, 200 feet of 12" concrete pipe installed, etc.. So that would be my table for daily quantities. Next I would create a table that would calculate all those daily quantities with prices and totals for a one month period (So the client would know how much that months bill will be). Then I would like to create a third table that would calculate all the monthly totals so the client could see the total bill for the entire project at any given time.

                Thanks again for your help on this solution,

                Larry