1 2 3 Previous Next 33 Replies Latest reply on Nov 5, 2013 11:38 AM by AnitaJenkins

    Creating separate records in multiple layouts



      Creating separate records in multiple layouts


           Another likely silly question!?!
           I have one database file containing nine different layouts in FM12. Clients, providers, resources etc. (This is primarily an info storage database)

           Say I'm in my "Clients" Layout, when I click "New Record", a new file is created in all of the nine layouts. The data doesn't carry over, just a new blank record is created in each layout... Same happens when I click "Delete Record" which is very problematic!! It deletes the record in all layouts. So how do I separate things so that a unique record can be created in each layout?

           Very appreciative for any help you can offer:)


        • 1. Re: Creating separate records in multiple layouts

               What do you have when you go to Manage | Database | Tables?

               To store data, you need a table. To see and edit that data you need a layout associated with that table. What you describe sounds like you have 9 different layouts all linked to the same table where you need several different tables so that records created on one layout need not be from the same table as records created on another.

          • 2. Re: Creating separate records in multiple layouts

                 You are correct. I just have one table between all of the layouts.

                 What would be the best way to proceed in resolving this? Should I just duplicate the table? I guess I don't really understand how to define the relationships.

                 Thanks so much!

            • 3. Re: Creating separate records in multiple layouts

                   With a single table, you don't have any relationships.Once you have different tables defined in your database, you can create relationships that link records in one table to records in another.

                   Go to Manage | Database | Tables and define additional tables for your different types of records. When you create a new table, FileMaker automatically creates a new Tutorial: What are Table Occurrences? in Manage | Database | Relationships and a new layout with exactly the same name. This often creates confusion in new developers as it is easy to assume that a table, a layout and a table occurrence box are all the same thing when, in fact, they are three different objects and each as a different "job" in your database design.

                   Once you have a table defined, you can go to Manage | Database | fields and define the fields for that table.

                   You may find that you can duplicate your existing table and then remove unused fields--that are only needed in one of the other tables--from each such new table. There are only two ways to duplicate a table:
                   1) If you are using FileMaker Advanced, you can copy and paste a table in Manage | Database | Tables.

                   2) You can use import records from the FIleMenu to import the existing table from the current file back into the same file with "new table" selected as the target table.

                   It may look like you can duplicate a table in Manage | Database | relationships, but the duplicate button here duplicates a table occurrence not the actual table and thus cannot be used for this purpose.

              • 4. Re: Creating separate records in multiple layouts

                     Thanks so much. This oughtta keep me busy for a while!! 

                • 5. Re: Creating separate records in multiple layouts

                       Issue resolved beautifully! Thank you. The import function worked great as I just have Pro. Saved me a ton of re-typing.

                       I'm perplexed by a couple of other things. How to make checkbox data slide and titles fields slide along with data fields being one of them... Is it best to start a new post with the question? I am searching the forums and reading the help files I promise!!!

                       Very appreciative:)

                  • 6. Re: Creating separate records in multiple layouts

                         Whether you start a new thread or stay here is up to you. Longer threads usually narrow your pool of possible help down to one other person where a new post tends to be more likely to be read (and possibly responded to) by more people, but then you have to describe your basic database setup all over again also.

                         Here's a thread you may want to read before starting a new thread of your own: Please Help Us to Help You...

                         If you want to continue the discussion here, you'll need to describe what you want in more detail as I'm not sure what exactly you mean by "slide along with data fields".

                    • 7. Re: Creating separate records in multiple layouts

                           Thanks. I'll include that info with all future posts. 

                           In regards to sliding fields, I have two sets of questions -
                           My 'Edit Box's' / data entry fields each were created with a label. I can get the edit box / field  to slide up if empty, but not the label along with it. I've tried grouping them with no luck... It makes sense to me as to why this is occurring but I need those boxes to have a label so one knows what data to put into the field and I need it and the label to vanish if empty when printing or creating a pdf... Is this do-able? 

                           Additionally, I have a few sets of checkboxes and would love for the un-selected lines to slide up.  I've uploaded a jpg that shows my layout. So say a  facility does not have a 1bedroom available, I'd like that field to go away. On the amenities tab, I have three sets of checkboxes listing amenities. I'd like the uncheckd amenities to not be visible when printed. You can see a small example on my screen shot under licensure types.

                           I'm running Windows 7 and FMpro. I am very new at this (obviously!!) and appreciate your help very much :) 

                      • 8. Re: Creating separate records in multiple layouts

                             It's often necessary to have two layouts--one for data entry and one for printing/saving as PDF. When you want to print, a button on your data entry layout can be used to switch you to the print layout.

                             By using two layouts, your print layouts could replace the label text with calculation fields that show the label for the field it labels only if the field is not empty. Then you have pairs of fields that can slide up when the data field is empty as the label field will then also be empty.

                        • 9. Re: Creating separate records in multiple layouts

                               Yes - I do have separate layouts for printing, and I tried creating container fields as suggested but the labels still will not slide with the field? The field contents all slide up to the top, thus placing them next to incorrect labels!

                               Can sliding occur within checkboxes? I cant seem to get these little buggers to budge at all!!


                          • 10. Re: Creating separate records in multiple layouts

                                 To repeat: Checkboxes will not slide as they show the same text whether or not the check box values are selected. You could remove the check box formatting and use an edit box format. you'll lose the check boxes but instead, you'll have a vertical list of the text entered when each check box was clicked in the order that it was clicked.

                                 I did not suggest container fields, I suggested calculation fields. A label field for "Field1" would be defined as follows:

                                 If ( Not IsEmpty ( Field1 ) ; "Field 1" )

                                 and Text would be selected as the result type from the drop down in the Specify Calculation dialog.

                                 Since this field will be empty whenever Field1 is empty, it can be set to slide up just as you have Field1.

                            • 11. Re: Creating separate records in multiple layouts

                                   BTW I have thought of a way to get a check box field to only list the values selected on your data entry layout. It requires setting up a conditional value list based on a self join relationship so that may take you into areas that are brand new for you. It also requires a primary key field that uniquely identifies each record in your table such as you can set up with an auto-entered serial number field.

                              • 12. Re: Creating separate records in multiple layouts

                                     Apologies, I mis-typed! I did mean calculation fields... Working too late! I'll play around with defining the labels as you mentioned above.

                                     I'm uploading a screen shot of the layout I'm working on so you can see what I'm trying to achieve.

                                     It is very important that blank or un-selected fields go away so that a client is not seeing irrelevant info... I am in a bit over my head with this for sure. Have only been a FM user, but this was recently added to my job description so I'm learning as quick as I can!?!? I have the skeleton put together, just needing to make it jump!!!

                                     Any workarounds for the checkbox situation would be greatly appreciated. Happy to go through a tutorial if you know of a relevant one. It is not important that check boxes are there. I just need a way to select specific data in the data entry page and then have only that data appear on the print layout page...

                                     Thanks for your patience.

                                • 13. Re: Creating separate records in multiple layouts

                                       I can't help thinking that a major restructuring of your data model might simplify your project by a great deal. A related table, set up like Invoice Data so that each check box option and each field in the Pricing section represents a record in that related table can make the whole "sliding" issue go away for you though it also will be easier to set up with a different layout design than you have. You may want to examine the invoices starter solution and imagine using the portal shown there to collect all the info shown in your screen shots.

                                       To get a check box field that only shows the selected values, a conditional value list could be defined, but this requires defining a relationship between your current table and itself. I'll use the LicensureTypes fields as an example.

                                       Define a self join relationship. In Manage | Database | relationships, make a new Tutorial: What are Table Occurrences? of YourTable by clicking it and then clicking the duplicate button (2 green plus signs). You can double click the new occurrence box to get a dialog to appear where you can rename the new occurrence box.

                                       We have not duplicated a table. Instead, this is a new reference to the same table already present in your database.

                                       Add it to your relationships like this:

                                       YourTable::__pkYourTableID = YourTable 2::__pkYourTableID

                                       Now define a value list in Manage | Value Lists. Select the Use values from a field option. Select YourTable 2::licensureTypes as the field for this value list. Then select the "include only related values" option and select YourTable from the "starting from" drop down.

                                       Now update your print layout to use this new value list for the LicensureTypes field and set it to slide up.

                                  • 14. Re: Creating separate records in multiple layouts

                                         Here is a screenshot in Layout view w/ field names &  labels. I played around with defining the labels but am missing something... would I define them in conditional formatting? This is where I ended up and tried replacing the field names you entered with ones of my own but no go? FM just kept popping up with 'cannot find the specified field'... 


                                    1 2 3 Previous Next