June 28, 200520 yr So far, I've split an existing application into 2 layers ... 1) data (more or less one file per table, but as I normalize further, I will break some tables into several tables in the same file) and 2) UI (one per major user function.) However, I have some common scripts which at the moment are duplicated in each UI. Would it make sense to create a separate file to contain these? (One possibility would be to combine them with the Global data file I created with all of the global fields.)
June 30, 200520 yr Patricia-- When you set up multiple UI files, you end up duplicating scripts from one file to the next, as you've found. Unless you have compelling reasons otherwise (such as you're selling a modular system and expect to have some functions paid for separately), most folks recommend putting ALL your UI functionality (layouts & scripts) in one database file. Then you only have one place with the scripts. The UI file will have file references to your data files, and table occurences for your various tables. The layouts will be built on these table occurences.
June 30, 200520 yr Author I agreed to convert this system from FM6 to FM7. Unfortunately, I haven't found any way to import layouts from one UI file to another. I have been able to import scripts. Is there an import function for layouts? That is part of the reason that I kept separate UI files.
June 30, 200520 yr Copy and Paste. Copy a layout in Layout mode, go to other file an paste in in a new layout.
June 30, 200520 yr Author Well ... yes .. I found out how to do that ... but it was a painful process so I thought there must be a better way that I was missing. Thanks
July 5, 200520 yr You can make the layout moving almost painless by observing the following process: 1. Create value lists as needed, with matching names (source and target files) 2. Create relationships with matching names 3. Create blank layouts with matching names - don't paste yet! 4. Import scripts - 4b. Review scripts, and if any have a number appended to them (e.g. My Script2), go into your source file and rename to match. 5. Copy and paste layouts If you do this, all your layout fields and buttons should work correctly.
July 5, 200520 yr I think you may need to add a 'step'. Step 0. Never delete a field, relationship, value list, or script. If you do, you cannot say for sure whether they will all match up correctly in a new file. So check all fields that are formatted as buttons or value lists, or included in scripts. to be sure that none of them have something 'missing' or are using the wrong ones.
Create an account or sign in to comment