7 Replies Latest reply on Dec 22, 2011 9:33 AM by RedzwanLatif

    How to display a field from another table?

    RedzwanLatif

      Title

      How to display a field from another table?

      Post

      Hi.I've copied a field from another table. But the field only display value if it's global. How to do it?

        • 1. Re: How to display a field from another table?
          mgores

          It sounds like the two tables aren't related.  Globals will display because they do not depend on relationships.  But you have to have some type of relationship to display any other field from a different table.

          • 2. Re: How to display a field from another table?
            philmodjunk

            Did you copy the field to a layout or did you open manage | database | Fields and copy a field from one table to another table?

            If you copied a field from a layout based on table 1 to a layout based on table 2, you need to also define a relationship between table 1 and table 2 in order for it to display data.

            • 3. Re: How to display a field from another table?
              RedzwanLatif

              both table are related. Do I need to create other occurances for it. Both table are linked betwween another table at middle. I copied the field using layout. I havent manage | database | Fields and copy a field from one table to another table .

              • 4. Re: How to display a field from another table?
                philmodjunk

                Please describe the relationship. Since you have a relationship with three tables:

                LayoutTable-----anothertable-----TableWithfieldyoucopied

                There must be a record in anotherTable that matches to the current record in LayoutTable and also to at least one record in TableWithfieldyoucopied or the field will be empty.

                • 5. Re: How to display a field from another table?
                  RedzwanLatif

                  @PhilModJunk. yes. I mean like that . Thanks. It worked. But, I want to display the whole records summary.. The field result seems different . On the TableWithfieldicopied , the summary field display the total of whole records. But in LayoutTable , the summary field are only displaying the total of one record. How to make the copied field in LayoutTable to display the whole records total?

                  • 6. Re: How to display a field from another table?
                    philmodjunk

                    Yes, with the relationship involved, a summary field summarizes the set of related records--which would appear to be just one record in this case. When you put the summary field on a layout based on TableWithfieldyoucopied, on the other hand, it summarizes all records currently in the found set--which could be all records in the table.

                    You need a different relationship that matches to all records so your summary field can summarize all records in the table. Use this relationship:

                    LayoutTable----<TableWithfieldyoucopied

                    LayoutTable::anyfield X TableWithfieldyoucopied::Anyfield

                    You double click the relationship line between the two table occurrence boxes to change the default = to X. The X is a cartesian join operator that matches any record in LayoutTable to all records in TableWithfieldyoucopied and Vice Versa.

                    Given your current relationship, it's very likely that you can't make the exact change I've just shown because you need the anothertable-----TableWithfieldyoucopied relationship for other purposes. If this is the case, you need to make a new table occurrence of TableWithfieldyoucopied to use with the X operator and for your total records summary on your layout.

                    Select TableWithfieldyoucopied in Manage | Database | relationships by clicking it. Then click the duplicate button (Two green plus signs). This makes a new table occurrence with the same data source table. You can double click the new occurrence box to open a dialog where you can change its name to something more descriptive than the original table occurrence's name plus a number. Link this table occurrence in with the X like I have described and add your summary field from this table occurrence.

                    If "table occurrence" is a new term, you may want to read/do this tutorial on the subject:  Tutorial: What are Table Occurrences?

                    • 7. Re: How to display a field from another table?
                      RedzwanLatif

                      Thank you very much PhilModJunk. It really worked !!!!! . Thanks for your detail answer.Its a useful information . :)