4 Replies Latest reply on Jan 7, 2016 7:30 AM by karimhanafi

    Displaying records horizontally

    gary@ehrenfelds.net

      I have a a data base where I have a student name, school, attempt as fields .

      Each student will have 6 attempts and each attempt will have a different number.

       

      I want to display the student 6 attempts as one row:

       

      Sam Smith  Oak Harbor  1   2   3   4   5   6

      Joe   Jones  Evertt          3   4    2   8   9   10

      ........

       

      Anyone know how I can do this?

        • 1. Re: Displaying records horizontally
          TorstenBernhard

          If you have set up a table with those fields, you'll need a layout based on the table's TO in order to display and enter data.

          • 2. Re: Displaying records horizontally
            gary@ehrenfelds.net

            Sorry what is TO? I do have a table with those fileds.

            • 3. Re: Displaying records horizontally
              TorstenBernhard

              Hi Gary

              Sorry, I should have explained a bit more in detail. TO is shorthand for Table Occurrence. In a FileMaker database scheme, tables are represented through Table Occurrences. Relationships are defined between TOs. One table can have more than one TO, which must be named differently. This is a bit different from "classic" SQL DB but quite powerful and easy to learn.

              In the "Resources" section of this site you will find helpful info "Quick Start" in order to get familiar with the Filemaker concepts.

               

              Cheers

              Torsten

              • 4. Re: Displaying records horizontally
                karimhanafi

                Hi Gary,

                 

                TO means Table Occurance, it is a reference for your table on the relationship graph. What you see in the graph are TOs not the actual tables.

                 

                Back to your question, can you please provide a little bit more information on your table structure? Is each attempt a separate field or do you use a repeating field?

                 

                Your problem can be solved with an executeSQL calculation, if you want all the students in your table, this can be as simple as :

                ExecuteSQL ( SELECT \"Student Name\", school, a1, a2, a3, a4, a5, a6 FROM your_table_name ; Char (9) ; "") where a1, a2, etc. represent the fields you are using for storing data for each attempt.

                 

                This is just a basic eSQL function which will get you ALL the rows in the table. If you need just a subset of all the rows, you will need to modify the SQL query by adding more clauses (WHERE, etc.).

                 

                Hope that helps.