12 Replies Latest reply on Feb 6, 2014 1:03 AM by JDChua

    Creating new tables in portal row

    JDChua

      Title

      Creating new tables in portal row

      Post

           Hello everyone, 

           I am attempting to create a portal row, in which there is a table of figures in it. 

      Basically, what I will be doing is to key in figures into a table, and then I like a "new" button, which I'm trying to get filemaker to create a new table at the bottom of the table above. 

           How do I do that? I have been testing several scripts and have failed. 

           I have already created a new layout with the table/fields in it. And then with the portal row, I filled it with the fields in that layout. 

           Does that make sense? 

           Help! 

            

           Thanks & Regards,

           Filemaker noob

        • 1. Re: Creating new tables in portal row
          davidanders

               It sounds like you are looking to have a portal within a portal (nested portal) - this is not allowed.

               This Thread discusses the options.

          http://forums.filemaker.com/posts/e47206816d?commentId=238386#238386

          • 2. Re: Creating new tables in portal row
            philmodjunk

                 On the other hand, your "table" might be a single related record in your portal made up of a set of fields. If that sounds like an option that could work, you'll need to describe what you have in mind in more detail.

            • 3. Re: Creating new tables in portal row
              JDChua

                   So I have 18 drop-down-lists to fill on the main layout. Each of them are enabled to edit its values. Along with the 18, there is an edit box for "Notes". After completing the list, I like, with a button, enter it into a portal row and ready for us to fill in a new list.

                   The portal row is from layout_2 with the same amount of drop-down-lists. 

                   What should I do? 

                   I have uploaded a picture. I hope this helps to help. 

                    

              • 4. Re: Creating new tables in portal row
                philmodjunk

                     Please describe those "18 drop down lists" and the fields into which they enter data. Please describe the basic intended purpose for each table. What does a single record in either table represent here?

                     Please note that a much simpler relationship would be to link a single field from Camera Data that stores a "unique identifier" to a single matching field in Main instead of using 19 pairs of match fields would appear to be a much better relationship to use here.

                • 5. Re: Creating new tables in portal row
                  JDChua

                       Thank you so much for replying. 

                       These tables are for keeping records on a film set and here are a few descriptions of each fields. They would help the crew understand how the camera was set up, how far the actor is from the lens, what kind of camera are we using. 

                  UNIT: "A, B, C, Splinter, GoPro"

                  MOVEMENT: "DOLLY, PAN, TILT, TRACK, STICKS" 

                  ISO: "100, 200, 400, 800" 

                  SHUTTERSPEED: "180, 90, 45" 

                       All of them, expect for CAMERA NOTES, are drop-down-lists with "allow editing of values list" checked. 

                       They are all on the main layout page with a "ENTER TAKE" button. At the bottom lies the portal, of which the record of that take will be listed and then ready for the next take. 

                       I have uploaded a picture of the page. 

                  • 6. Re: Creating new tables in portal row
                    philmodjunk

                         For some reason, your original screen shot of your tables/relationships no longer shows.

                         As I recall, you had a table named Camera and one named Camera Data or some such.

                         To do this, I think that you'll need more than just two tables.

                         Having a "Camera" table where you have one record for each camera makes sense. But your other data would seem to also need to be linked to an additional table where you have one record for each "scene" or some such so that a given Camera Data record documents how one camera was set up for a specific scene in your movie or episode.

                         Camera-----<CameraData>-----Scenes>------Episode/Movie

                         Camera::__pkCameraID = CameraData::_fkCameraID
                         Scenes::__pkSceneID = Cameradata::_fkSceneID
                         Episode::__pkEpisodeID = Scenes::_fkEpisodeID

                         For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

                    • 7. Re: Creating new tables in portal row
                      JDChua

                           Hello PhilModJunk, 

                           I have set the relationships to link with the relevant fields. Sadly, it does not work still. 

                           After filling the fields above, when I click the Enter Take button, it just highlights the portal row. Maybe it is the scripting that I have problems with? 

                      • 8. Re: Creating new tables in portal row
                        JDChua

                             Even an experiment on a single field does not work. 

                        • 9. Re: Creating new tables in portal row
                          philmodjunk

                               Neither copy record nor duplicate record look like the right steps to use for this. Depending on the options you select for a portal's underlying relationship, you may not need to use ANY script to create a new record in the portal.

                               Nor should the copy and paste steps be used to move data around with FileMaker Scripts for this type of purpose. There are better options.

                               Why do you want to copy an existing record?

                          • 10. Re: Creating new tables in portal row
                            JDChua

                                 Hi PhilModJunk! 

                                 We have a list of setups already planned for. Say, for scene 10, we have 8 shots. So during shot number 3, we might have 4 to 5 takes. 

                                 So thus, for each take, I have to take records of how the cameras are set up by filling each field. When the take is done, I press "ENTER TAKE". And then, the records will go into the portal row. When the crew goes for another take of the same setup, a take 2, I would fill the fields again and then "ENTER TAKE", the records will go into the portal row again, right above the first record. 

                                 I have attached a full page screenshot. So sorry it took me this long to upload any screenshots - all infos are pretty sensitive until I'm given permission to upload. 

                            • 11. Re: Creating new tables in portal row
                              philmodjunk

                                   yes, but this does not require using duplicate record to do. Make the fields where you enter the data initially global fields. When you click the button, a script can create a new record in the portal's table and set field steps can directly reference the global fields to copy the data into the new record.

                              • 12. Re: Creating new tables in portal row
                                JDChua

                                     Thank you so much for your help! 

                                     I have decided to clone the records instead, and then I will come back to portals another day when I don't have deadlines to worry about. So for every take, I will clone a new record.