1 Reply Latest reply on Feb 20, 2012 9:31 AM by philmodjunk

    how to put different layouts on tabs



      how to put different layouts on tabs


      I've developed a pretty simple database using (so far) just two tables (plus a join table), and two basic layouts, one per table. I'd like to put the two layouts on two tabs. Putting one layout on a tab is simple, but I was stumped as to how to get the second layout onto the second tab. I tried copy and paste from the second layout to the second tab on the first layout... which seems to work, but has some difficulties... is this the proper way to do this, or is there a better way? Particularly, a portal on the second tab is listing multiple instances of the same record.. three or four instances where there's only one matching record. The portal works as desired on the original layout, just not when copied to the first layout's tab.

        • 1. Re: how to put different layouts on tabs

          Well, you can put tab controls on a layout, you can't put layouts on a tab control...

          Each layout you have in your database will refer to a specific table defined in your database in Manage | Database. You select a table for a given layout by selecting the name of a "table occurrence" from the drop down named "show records from" that you can find when you enter layout mode and select "layout setup..." Each table occurrence is a "box" found in Manage | database | relationships. There can be more than one such box for a given table. These boxes are used to define relationships between tables--which in turn controls how information in one table is linked to records in another.

          When you add fields to a layout that are added from a specific table occurrence. If from the occurrence listed in show records from for that layout, you see just the table names when you are in layout mode. If you add fields from a different occurrence--which is what happened when you copy and pasted from the other layout, you'll see a :: before the field name to show you that it comes from a related table occurrence. That works only if the relationship between the two tables is valid for the current record and you only want to display data from a single related record.


          You have a layout for invoice, a layout for line items and a layout for products and you have this relationship: Invoices---<lineitems>---Products, making Lineitems a Join table linking the other two.

          If you add fields from LineItems to your Invoices layout, you can display data from a single line item record if it is related to the current record in Invoices. If you change records to a different invoice, a different line item record will appear. BUT, typically an invoice lists multiple line items for a given invoice reocr and this only allows you to show one such record. To see multiple line items, you'd need to add a portal to line items to your layout so that you can see and work with multiple line item records for a given invoice.