Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to put interface in one file, data in another


This topic is 6607 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am an experienced developer, but new to FileMaker. I have two questions that I may need a bit of fairly explicit instructions to figure out how to do:

1. I want to set up my application so interface components are in one .fp7 file and tables are in another .fp7 file. My purpose in doing so is so I can more easily distibute interface updates, by simply replacing the client's interface .fp7 file, while keeping their current data .fp7 file. (On rare occasions, I may need to update the table structures and this would not work.) How do I do this?

2. If I have two .fpy files and one has a layout in it that I like and want to incorporate in second .fp7 file, how do I import or copy the layout from the first file to the second?

Thanks for any help.

Posted

It's really not that difficult to do. You just need a File Reference to the Data file, then put table occurrences for it in the Interface file, then layouts based on those TOs, then scripts. You will practically forget you're not in the data file, until you need to do something like define a field.

In large solutions the separation into 2 files can be a blessing. Because the Relationship Graph in the Data file will be kept pretty simple, with only relationships needed to such things as define calculations which depend on relationships, and very few scripts.* It will have layouts, but most of them will be what I call "developer" layouts, laid out for viewing and troubleshooting lots of data.

Whereas the Interface file will have a complex graph, and lots of scripts. It will likely have a few tables of its own, for things like globals, constants, and possibly graphics; whatever is needed for the interface and for temporary storage of data (much of this could also be put in the Data file, but it's cleaner and more flexible to let the Interface file handle it).

*There are some small areas where "separation of data" solutions may require extra tweaking. One I've run into is that [x] Run script with Full Access only applies to the file the script is run in; and the data's in the other file. In that case you can just run a basic script in the Data file. An example of this is a Copy All Records script, which otherwise requires Export privileges, which may not be desirable. The new function List() in 8.5 can handle the same chore without these drawbacks. (A Loop or a Custom Function with GetNthRecord could also, but they're slow for large record sets.)

I haven't gone so far as to build all my solutions with separation of data, but I've done a little bit. And I've worked supporting one huge solution (2.5 GB data file) that uses it. It works well. We did have to build a pretty massive "import all the tables" for data file updating. Which is always required at some point. Computers do crash, however rarely, data files need to be imported into clean clones; best be prepared with an automated routine, especially on large solutions.

Posted

Oh yeah, to copy a layout, you can just copy/paste it (in Layout mode) into the other file. If it has a lot of fields, I have a little trick I use. Which is to first temporarily rename the main table occurrence (of the layout) to *exactly* match the one in the other file. Then when you paste most if not all of the fields will line up (to their same-named counterparts). Then rename the TO back to its original name. It hurts nothing else and just takes a couple minutes to do. Beats heck out of retargeting a whole bunch of fields.

  • Newbies
Posted

I am following the concepts, I think, but am stuck finding where to go to get started. 1) where to create table occurrences (in Relationships? but I don't see yet) 2) in Layout mode how to point to an entire layout (rather than the objects inside a layout) in order to copy and paste.

Thanks!

  • Newbies
Posted

I see Table Ocurrences in Relationships (just didn't know the term), but still don't see how to select and copy an entire layout.

Thank you!

Posted

You cannot copy/paste a layout as such. You can only copy objects on a layout and paste them into another. See these threads for pointers on how to make this relatively painless:

http://www.fmforums.com/forum/showtopic.php?tid/180665

http://www.fmforums.com/forum/showtopic.php?tid/180210

This topic is 6607 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.