7 Replies Latest reply on Mar 2, 2014 7:28 AM by philmodjunk

    add field in separation model

      Title

      add field in separation model

      Post

           I have just followed a post by PhilModJunk on implementing my existing database as it seems to make more sense for when I need to update the programming, 

           This is probably a stupid question, but how do I add new fields in my database - now that I have removed all the tables in my 'program' database, there are no tables to add and I cannot see how to add to the datasource, data.fmp12..

           And with popovers - Do i have to use the standard grey buttons, or can I apply a popover to an image, like i can with a normal button?

           Thank you

        • 1. Re: add field in separation model
          philmodjunk

               a) You open the data file and add the field there to the appropriate table. Then you open the interface file and add the field to any layouts that require it. And yes, this will be a case where you still have to import records to move to the new version as you've made a change to your data file.

               b) They have to be the standard buttons, but you can work around this limitation so that it looks like the graphic is the popover button. You can use the Hide When property in the inspector to always hide the popover button by entering True into that box. Then you can set up the graphic as a standard layout button that uses go to Object to open the popover. The trick is to select the popover Frame and give it the object name used in your button's script instead of giving the object name to the popover button. Go to Field, if it puts the focus in a field in the popover frame will also open the popover.

          • 2. Re: add field in separation model

                 Hi Phil,

                 thank you

                 Could you expand on :

            And yes, this will be a case where you still have to import records to move to the new version as you've made a change to your data file.

            what do you mean?

                  

            • 3. Re: add field in separation model
              philmodjunk

                   Anytime that you modify the data file, in a new copy of your database file, you'll need to import the data from your working copy of the file into the new file. This is a case where the data separation model does not avoid the need for this operation.

              • 4. Re: add field in separation model

                     Hi Phil

                      Thank you. 

                     So to be clear:

                     I have two files - The Data file and Interface file.

                     I (admin) make a copy of the interface file and data to alter and test. . The users continue to use the original interface file with Data..

                     I then copy over the original interface file with my amended version. This new version should link to the latest copy of the data file automatically. Therefore no need to import any new data...?

                     Is this correct as wasnt sure about your last sentence...thank you

                • 5. Re: add field in separation model
                  philmodjunk

                       Correct for changes to the interface file. But if you add a field to the data file, you still have to import data into a new copy of the file. The data separation model reduces the need for importing records but does not totally elminate it.

                  • 6. Re: add field in separation model

                         Ah I see. I havent got that far with this new model of mine as only altered it on Friday. So to add new fields, I open the Data file and add it. Then I will have top open (new) interface file to add it to various layouts. Then I have to import this new field to the original 'active' data file. But these new fields wont actually have any data in in most cases...is that correct? Thank you

                    • 7. Re: add field in separation model
                      philmodjunk

                           good point, you could just open the active copy and add the field to it to avoid any need to import records.