14 Replies Latest reply on Jun 12, 2017 10:01 PM by gofmp15

    Layout Question


      Hello Forum users.

      I've got a layout problem.

      I've made a file with several layouts who correspondent to a product.

      But is if make a new record and I switch the layout it switches in all the records.

      Is there a way of save each layout which I chose for a specified record?


      Greetings Martijn.


      Schermafbeelding 2017-06-06 om 13.26.07.pngSchermafbeelding 2017-06-06 om 13.26.19.png

        • 1. Re: Layout Question

          If you have a good qualifier in your products data that can help you decide to show layout 1 or layout 2 then you could use an OnRecordLoad event trigger to go to the proper layout based on that qualifier.

          • 2. Re: Layout Question

            Hello Wim.

            Could you give me a hand with the script part?

            I'm just starting using filemaker and i'm not so good with the scripting part.

            • 3. Re: Layout Question

              You may need to provide more information. A "generic" script may not fit with your database and needs.

              For writing scripts, I typically advise to manually think through all the steps you need.

              Go to Layout




              If you can manually think through the steps, it can be scripted!

              There will be "qualifiers", but we don't know enough to help the best.


              Also, it may help to study the FileMaker Training Series or any of the tutorials (here).




              Free FileMaker Training Series: Advanced for FileMaker 15

              Training, Examples, and Tools

              1 of 1 people found this helpful
              • 4. Re: Layout Question

                Let me have a look if i can get it working.

                Thanks for the advice.

                • 5. Re: Layout Question

                  Thanks - will check out the training series

                  • 6. Re: Layout Question

                    Hello Guys and Girls.

                    I've got a new problem.

                    I started with a script to recall 1 of my 8 Lay-out's

                    But it works on the first 3 Lay-out's but not on the other ones.

                    This is my script.

                    The second screenshot is where i get my info from.

                    Can somebody tell me what i'm doing wrong?


                    Schermafbeelding 2017-06-12 om 20.16.35.png


                    Schermafbeelding 2017-06-12 om 20.27.44.png

                    • 7. Re: Layout Question

                      Not from the info provided. "it doesn't work" doesn't give us much to go on.


                      I will note that your script is only checking the value of TypeID for which ever record is the current record so you need to consider:


                      Is the correct record current?

                      Does that record specify the correct type Id?

                      Is the script actually being performed?


                      And if you have set up an script triggers on these layouts, you have to consider whether your script is triggering a script trigger that then runs yet another script that then interferes with the results that you expect here.

                      • 8. Re: Layout Question

                        Hello Philmodjunk.

                        Can't i upload my file here?


                        But my problem is the next.


                        Schermafbeelding 2017-06-12 om 21.23.40.pngSchermafbeelding 2017-06-12 om 21.24.08.png

                        I've got 8 different Lay-outs.

                        The TypeID number is the number you see at the Type field.

                        But as you can see on the right side is that for each Lay-out i got a different condition check list.

                        It can happen that i got like 30 items from 8 Lay-outs which i want in one file.

                        So if i want to recall 1 item i need the good Lay-out.

                        The only reference i've got is the TypeID field all the others will change all the time.


                        But what i did in my script is that good?

                        Start with IF and then Else If and  Else if etc.

                        Cause if that's good my problem (that it only works till nr 3) will be somewhere else.

                        • 9. Re: Layout Question

                          If you used the advanced editor, see link in upper right corner of your reply box, you can upload a copy of your file as a reply to this thread.


                          I would not set up my solution like you have, but your script seems correct. That then leads to my questions about data, current record and whether your script is being performed when you think it is being performed.


                          For example, if you run the script and the layout correctly changes, but then you change to a different record, you may now be on the wrong layout for the current record until you run that script again.


                          What I would do is make that check list a set of related records where both the label and the response are a pair of fields in that related table. Each type of product could then use the same layout, but with a portal that lists the check list questions that are specific to each product type.

                          • 10. Re: Layout Question

                            Hey Philmodjunk.

                            Ok here is my file.


                            I do not really understand what you mean with the Lay-out.

                            Cause I made it this way cause i couldn't get it working an other way.

                            What you are saying is that when i select for example a Helmet in the Type field.

                            Then on the right side the checklist options can appear or disappear?

                            • 11. Re: Layout Question

                              The original problem is that the field on your layout and the field in your script are not the same field.


                              The field on your layout is "Objects::CountryID". The field in your scripts: "Countries::TypeID".


                              What I am suggesting is that you set up one layout where the right hand set of fields automatically changes to a list of related records in a portal where the items listed are determined by the object type. This gives you one layout to create and maintain instead of multiple layouts.


                              I suggest that you set up some related tables and a portal to make this happen.

                              • 12. Re: Layout Question

                                Ok let's try to do that.

                                Thanks for your quick response.



                                • 13. Re: Layout Question

                                  Hey Philmodjunk.

                                  I've got it working.

                                  Still with my own design.

                                  I've changed the script from TypeID to CountryID.

                                  And it works fine now.


                                  Thanks to all of you for the support.

                                  Greetings Martijn.

                                  • 14. Re: Layout Question

                                    It looks like the only difference is the area on the right.


                                    You might consider making a tab (or slider) area and use one for each of the IDs. This would create 8 or more tabs. Name each tab object accordingly "ID01" etc.


                                    Now when you open a layout you can have a trigger or step in the script determind the id and go to that tab object.


                                    Thus you would only need one layout with a tab object with 8+ named tabs.


                                    Each tab layout would contain the appropriate fields from your existing layouts.


                                    Does this make sense to you or do you need an example.