1 Reply Latest reply on Oct 15, 2010 8:48 AM by philmodjunk

    Newbie question



      Newbie question


      This may be a bit longwinded and I am hoping I can explain what I am trying to do well enough to get the help I need.  Here is what I am attempting to accomplish:

      I have one mass layout in table mode, this is imported from Excel.  I am trying to link one field of the table to another table, again imported from Excel so that when I select that record, I can open the second imported file.  I am hoping that in the end, I can search for a serial number in the second imported file from the main table.  I know this sounds rudimentary but I have been attempting to work with relationships and containers all week with no luck.  I can insert the second file into a container on the main table however this is only useful in that I can open that file, not search for a given serial number.

      I have thought about seperating the main table into individual tables and making a relationship into another table, would that help in the effort of what I am trying to accomplish?

      Once I get this worked out, I would like to create a nice form to input new data, and also search previous data that would all be linked to the original main table.


      Thanks in advance for any help.


        • 1. Re: Newbie question

          "Imported" and "inserted" are two very different things here. If you've imported data from an excel file into table A and you've imported data from an excel file into table B, then you can use Manage | Database | Relationships to link one or more fields in table A to matching fields in Table B. This can be created simply by dragging from a field in Table A to a field in Table B on this Relationships graph. You can't do any of this by inserting a file into a container field.

          Once you have such a relationship, you'd still need to use that relationship in order to do what you describe. You can place a Portal to Table B on a layout for Table A (but not with a table view layout). This is a good way to go if you have many records in Table B that link to a single record in Table A. You can simply place fields from Table B on the Table A layout, this works well if there is at most one related record in Table B for any one record in Table A.

          There are also ways to use a script step, Go To Related Records to switch from a layout in table A to a layout for Table B but only disply those records that are related to the current record on the Table A layout. This is not a script step to be used lightly, it has a lot of options and a misuse of this script step can even, in some cases, truly mess up your data if you have a script that is supposted to pull up a group of related records and then modify them.

          Finally, even if you don't define a relationship, you can right a script that simply uses the value of one or more fields in Table A to find records with the same values in designated fields in Table B. Here's a simple script that does that for just one value in one field in each table:

          Set Variable [$Criteria ; Value:  TableA::Field1 ]
          Go To Layout ["TableB" (TableB)]
          Enter Find Mode []
          Set Field [TableB::FieldA ; $Criteria ]
          Set Error Capture [on]
          Perform Find []