7 Replies Latest reply on Mar 16, 2011 9:19 AM by brian.curran

    Have I got it all backwards?

    brian.curran

      Title

      Have I got it all backwards?

      Post

      As mentioned previously, I'm used to working with MS Access so I'm still getting to grips with how FM Pro works...

      I have split my data into several tables and can enter the relevant details into each of them table by table. Next, I created a tabbed layout with each tables fields on its own tab.

      Great so far...

      However, I've now realised that these fields are only 'displaying' data from the table and I can't add data 'to' the table. Am I missing something obvious? It's got me stumped and I'm not sure where to look for the answer...

      Thanks
      Brian. 

        • 1. Re: Have I got it all backwards?
          brian.curran

          Ah, hang on - is it as simple as ticking the checkbox in the relationship to allow records to be created?

          • 2. Re: Have I got it all backwards?
            philmodjunk

            Hard to say. Did you use portals on your various tabs so that each tab can display data from a different table?

            If so, then you are probably correct.

            The thing to look out for is that each of your tables has at least one "box" called a table occurrence in Manage | Database | Relationships. Any given layout can only refer directly to one of these table occurrences. It's selected in the "show records from" drop down you'll find in Layout setup...

            Any reference to another table occurrence is then controlled by the relationship linking the layout's specified table occurrence to that other table occurrence. Your tab control as part of a layout can only refer to the same table occurrence as specified for the layout. To show multiple records from other tables inside the tabs requires using a portal and what records you see and how you can interact with them is controlled by the relationship between the layout's table occurrence and the portal's table occurrence.

            If "table occurrence" is a new concept: 

            Tutorial: What are Table Occurrences?

            • 3. Re: Have I got it all backwards?
              brian.curran

              I do have 1 or 2 portals, the checkboxes are ticked and they seem to be fine. However, I don't think the layout of a portal would be good enough for data entry and/or viewing unless I'm looking at them in the wrong light.

              The majority of the tabs contain fields that display data using the 'Specify Field'. For example, I have a tab called 'Alarm Co.', this displays the name and address of a single alarm co. from the 'Alarm Co.' table. There is a relationship between all the tables.

              It appears that I'm expecting each tab to act like its own individual layout, picking up data from the relevant table occurrence. However, the layout setup references a single table that all the other tables are related to. Maybe this is why it only half works?

              • 4. Re: Have I got it all backwards?
                philmodjunk

                Yes, the entire tab control shares the same table occurrence reference as specified in layout setup...

                However, this sentence makes a very good thumbnail sketch of a portal if you replace the word "tab" with "portal":

                It appears that I'm expecting each tab portal to act like its own individual layout, picking up data from the relevant table occurrence.

                Also keep in mind that the default "miniature table" look of a portal can be changed into a large number of other formats. By reducing the number of portal rows to one, then resizing and moving fields around inside the portal, you can get a "miniature form" look to your portal data instead of the table like default appearance. You can also hide the borders of this portal so that only the related fields are visible.

                • 5. Re: Have I got it all backwards?
                  brian.curran

                  Still working on this, having some success but failing at the same time...

                  Two quick questions:
                  1) In 'Table' view, what does it mean when an entry is shown in bold text?
                  2) After adding a portal and moving the fields around (to look like a form), can the portal background be deleted?

                  Thanks
                  Brian. 

                  • 6. Re: Have I got it all backwards?
                    philmodjunk

                    1) that the text has been given a bold text style? (Is this inside a field or layout text?, Browse or Layout View?) There's no special significance to Bold face as far as I know...

                    2) You can make the portal transparent (a fill pattern option). You can also give the portal borders a line width of zero to make them invisible as well.

                    Note that if you have a one to one relationship and thus will only need to display one record, you can place the fields from the related table occurrence directly in the tab without using a portal. The portal's main function is to allow the user to interact with multiple related records. (You can use the portal if you want, you just don't need to.)

                    It has occurred to me that my discussion of portals may have given you the false idea that you can't put fields from a related table occurrence directly on a layout.

                    • 7. Re: Have I got it all backwards?
                      brian.curran

                      "1) that the text has been given a bold text style?"
                      My stupidity astounds me sometimes!

                      Thanks for the update re: portals and relationships. Some of mine were set up incorrectly so I'm now going through each one and double checking everything. Thanks again Phil...