September 23, 200817 yr Hi, For creating children records starting from the parent table, I use a script like: Go to layout (target table for child records) New record/request (new child record) (Capture the child record ID) (Do some other tasks) Go to original layout The problem is that the database is growing and going to the child table layout is not practical anymore because when it does, it shows all child records (several thousands) before creating the new record. I cannot use a Go to Related Record because there might be no related records. Scripting a Find before the going to the layout is not practical either (does not make any sense, anyway: what am I going to find?). How can I script new child record creation and avoid showing all child records in the child layout? Take into account that all this is scripted, the user does not have any control over the process except pressing the New child record button from the parent table. Thanks Edited September 23, 200817 yr by Guest
September 23, 200817 yr Could you create the child records via the relationship from the parent layout? If you create a relationship and select to allow creation through the relationship, then you can have a portal and create all the records. You could also just use the relationship to create the first child record and then GTRR and create the rest of the records. Thoughts?
September 23, 200817 yr Author Could you create the child records via the relationship from the parent layout?... Hi, I do not allow users to create child records using a portal. Everything is scripted to have better control on what is going on, avoid user errors and have additional task performed during record creation. Thanks
September 23, 200817 yr Author Try starting your script with Freeze Window. Thanks. That solved the display issue. But: would it not be faster for FileMaker to create the record in a child layout with no records at all, instead of having thousands of records and adding one new record at the end? Just wondering...
September 23, 200817 yr It will probably be even faster if you remove all the fields from the child layout. Unstored calcs which are on display will slow things down.
September 23, 200817 yr I don't think so. Filemaker is a lazy application - it rarely does anything beyond what's required at the moment. If there's no window to render, then there's no need to figure out how many records are in the found set, or which ones of those are visible and need rendering, etc.
September 23, 200817 yr Change the layout to form rather than a list layout. If it's a list layout then FileMaker Pro must pull down all of the data for the records that are displayed in the window. With a form, it's only ever one record.
September 23, 200817 yr Filemaker is a lazy application - it rarely does anything beyond what's required at the moment. That's not lazy... that's highly optimised. I should know, I'm highly optimised too!
September 24, 200817 yr Author Thank you all for your ideas and comments. All seems excellent advise and very practical too.
Create an account or sign in to comment