7 Replies Latest reply on Apr 6, 2017 10:56 AM by howardh

    calc help: record x of related records

    ericjlindholm

      Feeling pretty inept right now because I cannot think of a way to do this! seems like it should be easy.

       

      I have a basic 1 to many relationship between 2 TOs

      I want to display something like "Record 2 of 3"

       

       

      example.  This Event has  4 EventDays.  they are create through a portal on the event layout. 

       

      the logistics manager looks at all eventDays in a list layout that references eventDays sorted by date.

       

      need to display that he is looking at day X of a 4 day event.

       

       

        • 1. Re: calc help: record x of related records
          philmodjunk

          I want to display something like "Record 2 of 3"

           

          In what context?

           

          Where on your layout do you want to put that?

           

          But if you enter layout mode and pull down the Insert Menu, you'll find that you can insert layout text objects for the record number and the found set. These can be put inside the row of a portal to show the row number and total number of records visible in the portal.

          • 2. Re: calc help: record x of related records
            markpelleymounter

            You could place (insert a Merge Variable) with the following -    Record {{RecordNumber}} of {{FoundCount}}

             

            If placed on the main layout, it will tell you which record number and how many records for the current found set.

             

            If placed within a portal it will show you the record number and number of related records.

            • 3. Re: calc help: record x of related records
              ericjlindholm

              example.  This Event has  4 EventDays.  they are create through a portal on the event layout. 

               

              the logistics manager looks at all eventDays in a list layout that references eventDays sorted by date.

               

              need to display that he is looking at day X of a 4 day event.

              • 4. Re: calc help: record x of related records
                philmodjunk

                If this is just the event days for a single event, the method we have recommended will do exactly what you want.

                 

                IF you have something like this in your report:

                 

                Event A

                   Day 1 of 3

                   Day 2 of 3

                   Day 3 of 3

                 

                Event B

                   Day 1 of 2

                   Day 2 of 2

                 

                Then a different approach would be needed and this can be done with a pair of summary fields.

                • 5. Re: calc help: record x of related records
                  ericjlindholm

                  the report of EventDays is sorted by date.  it appear

                   

                  date 4/1/2017 (sub summary when sorted by date)

                    EventA, day 2, needs to display day 2 of 3

                    EventB,  day 1, needs to display day 1 of 2

                   

                  date 4/2/2015

                  EventA, Day 3 of 3

                  EventB, Day 2 of 2

                   

                  Would a pair of summary fields still work?  poking at that idea now.

                  • 6. Re: calc help: record x of related records
                    philmodjunk

                    I am assuming this relationship:

                     

                    Events----<EventDays

                    Events::__pkEventID = EventDays::_fkEventID

                     

                    A calculation field defined in Events, Count ( EventDays::_fkEventID ) will give you the total days to an event and you can put this field on your layout to get the "of 2"  part of your figures.

                     

                    If you added another occurrence of event days with this relationship:

                    EventDays::_fkEventID = EventDaysPrior::_fkEventID AND
                    EventDays::Date >= EventDaysPrior::Date

                     

                    You could define this calculation field in EventDays: Count ( EventDaysPrior::_fkEventID ) to get the number before "of" in your report. These values will work no matter how you sort the records.

                    • 7. Re: calc help: record x of related records
                      howardh

                      a quick and easy solution is to create a portal that shows only one line record.

                      in the portal setup you can stipulate which is  the starting record and how many rows to view after the starting record.

                      so if you want to see record 5 in the row then the setting would be starting: 5 number of rows: 1

                       

                      in one of my customer's cases they wanted to show a dot chart of truck loads and a rate of purity of the material.

                      It worked well for that. there were 6 loads involved to see the rate of represented by a dot.

                       

                      in your situation you could do a slider control with each day of the event on a different panel.

                       

                      so he could look at any day event

                       

                      Howard