6 Replies Latest reply on Jan 8, 2014 1:10 PM by PaulProudman

    Form within a form

    PaulProudman

      Title

      Form within a form

      Post

           Hi guys, please can you help, I have filemaker pro 12. I am creating a treatment form for myself. But want to know if it is possible to do following.

           I create a new record for a client. I put contact details in as a header, this doesn't change.

           I have created a portal field which is used for each time the client comes back and has a treatment I am able to type in the details i.e date, cost per treatment etc. i would now like to have a button that creates a new consent form that they digitally sign on an iPad (which I can do). However my problem is this:

           I have created a button to create a new form to sign that takes me to the form with the signature, but it won't let me create a new form each time for each new section within the portal. All that happens is that it takes me to the same filled in form created on the very first treatment.

           So roughly this is what I want, Client form with address at top, portal for each treatment, each new treatment within portal then links to a form for them to fill in.

           Hope you can help been trying for days

            

        • 1. Re: Form within a form
          philmodjunk

               It appears that you have this relationship:

               Client-----<Treatments

               Client::__pkClientID = Treatments::_fkClientID

               Though my names may differ from yours.

               I would also guess that your "consent form" layout is also based on Treatments so that you can collect consent for each and every treatment. If not, it should be from what I can tell from your initial post.

               If that all is correct, then you can place a button inside the portal row that performs a script step similar to this:

               Go To Related Record [Show only related records; From table: Treatments; Using layout: "ConsentForm" (Treatments)  ]

               Your Consent Form layout can include a button to click in order to return to the original layout.

               Or you can use the New Window option in the Go to Related Records step to open the ConsentForm in a new window. Then you can return to the original layout just by closing that window.

          • 2. Re: Form within a form
            PaulProudman

                 Thanks for this I know its close, still doing the same. Not sure what the first setup is on here with the client. I am pretty new so still working my way round. Could you possibly give me a walk through. Really do appreciate your help

            • 3. Re: Form within a form
              philmodjunk
                     
              1.           Enter layout mode.
              2.      
              3.           Click on the button tool
              4.      
              5.           Draw small rectangle inside the portal row where you want this button.
              6.      
              7.           Button setup opens automatically.
              8.      
              9.           While it's usually better to use the Perform Script option with nearly all buttons, for this example, select the Go to Related Records option.
              10.      
              11.           Click Specify
              12.      
              13.           Select a name from the first drop down that exactly matches the name found in "Show Related Records From" in portal set up for your portal. This text should also appear in the lower left corner of your portal when in layout mode.
              14.      
              15.           From the second drop down, select the name of the layout that displays your consent form (this layout must specify the same table as your portal or this won't work)
              16.      
              17.           Select "show only related records" "Match current record only"
              18.      
              19.           Click Ok to close dialogs until you are back to the layout.
              20.      
              21.           Enter label text for the button if you want to.
              22.      
              23.           Drag the button if needed, to make sure that it is fully enclosed in the portal row. If using Filemaker 12 or newer, drag the portal a few pixels to make sure that the button moves when you move the portal.
              24.      
              25.           Return to Browse mode and try it out.

                    

              • 4. Re: Form within a form
                PaulProudman

                     Oh my god so sorry, its driving me mad. Have done the above but the button in portal 1 and then portal 2 opens the same form. Any ideas where I'm going wrong

                • 5. Re: Form within a form
                  philmodjunk

                       Go to the layout for the consent form. In Layout Setup... for this form, what table occurrence is named in the "show records from" drop down?

                       Check the fields on the layout by clicking them while in layout mode and checking the names shown to the left of the :: in "Display data from". Does that name match the name in the "Show records from" drop down for the layout?

                  • 6. Re: Form within a form
                    PaulProudman

                         Yes, thank you so much got it to work its was the last action that sorted it. Ill be able to sleep tonight thanks