4 Replies Latest reply on Mar 5, 2014 11:11 AM by philmodjunk

    Working with portals to show data

    algae592002

      Title

      Working with portals to show data

      Post

           I created a layout to use in form view, that shows how many words a student has read correctly. I want the layout to show a box per word per trimester next to each word. (e.g.: T1 box= blank, T2 box= "X", T3 box = "X").

           I've created a table with alll the fields I need to input data. I also created 3 duplicate tables of the same table, each representing one trimester. The relationship is:

           Table HFW record ID = Table HFW T1 record ID

           and

           Table HFW trimester = Table HFW T1 trimester if = to 1

           On the layout I put a portal that gets data from table HFW T1. The filter states: Table HFW record ID = Table HFW T1 record ID

           I then duplicated the portal to do similar for T2 & T3 data.

           It doesn't work.

           Does anyone know how to make this layout work?

      Preview_of_%E2%80%9CMicrosoft_Word_-_HFW_Student_Form_-_1st_Grade_%28English%29.docx%E2%80%9D_copy.png

        • 1. Re: Working with portals to show data
          philmodjunk

               You need to start with a table of Students, a table of vocabulary words and then a "join" table that records whether a) the word was read correctly and b) in which trimester the result was recorded.

               Students-----<Student_Vocabulary>-----Vocabulary

               Students::__pkStudentID = Student_Vocabulary|FirstTrim::_fkStudentID AND
               Students::constFirstTrim = Student_Vocabulary|FirstTrim::Trimester

               Vocabulary::__pkVocabID = Student_Vocabulary::_fkVocabID

               A script can generate one record in Student_Vocabulary for each record in Vocabulary . The above example works for the first trimester. You'd add two more const calculation fields and two more occurrences of Student_Vocabulary for the other two trimesters. (The Const calculation fields return a value for the first, second and third trimesters.) Note that there are no portal filter expressions needed for this approach.

          • 2. Re: Working with portals to show data
            algae592002

                 So I understand the basic structure you layout in your reply. What I'm confused about is what I'm understanding to be a calc field content to generate a result:

            Students::__pkStudentID = Student_Vocabulary|FirstTrim::_fkStudentID AND
            Students::constFirstTrim = Student_Vocabulary|FirstTrim::Trimester

            The value this generates is either a 1 or a 0.

            Having done this I don't seem to get the data to show on the layout as I'd like it to show.

            And forgive my ignorance; I also understand that by creating 2 occurrences , you mean duplicating the table "Student_Vocabulary" so each trimester is represented.

            In any case, if and when you get a chance, would you mind clarifying a bit more?

            Thank you very much for any guidance you can provide me.

            • 3. Re: Working with portals to show data
              philmodjunk

                   That is not a calculation field. It is not a field at all.

                   It describes the match fields to specify in the relationship linking Students to Student_Vocabulary.

                   I should have included this:  For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

              • 4. Re: Working with portals to show data
                philmodjunk
                     

                I also understand that by creating 2 occurrences , you mean duplicating the table "Student_Vocabulary" so each trimester is represented.

                If, by that, you mean using the duplicate button (two green plus signs) in Manage | Database | Relationships to duplicate a Tutorial: What are Table Occurrences? box in the relationships graph, then yes, that is what I meant.