5 Replies Latest reply on Jun 10, 2015 3:55 PM by philmodjunk

    2 portals

    wheymans

      Title

      2 portals

      Post

      I have a Persons-table and i have an Appointment-table.

      On the Persons-layout i am able to put a portal with 25 rows to create appointments with a date-field and a time-field. I don't want more than 25 rows (that's the maximum that is visible on my screen). However, i want to be able to see 50 appointments On the Persons-layout

      Is it possible to put another portal next to the first portal that allows me to put the next 25 appointments in there? I hope my question is clear enough.

      Portal 1 should show the first 25 appointment-dates.
      Portal 2 should show the next 25 appointment-dates

      Can anybody help me out?

      Thx,

      Wim

        • 1. Re: 2 portals
          philmodjunk

          Set up the first 25 row portal the way you want it. While in layout mode either ctrl-drag (option drag on mac) or copy paste to make an exact copy of the portal. Double click it to open portal set up and change the Initial row setting to 26.

          • 2. Re: 2 portals
            wheymans

            This way i can only create records in the Appointment-table when i am in the first portal.
            There"s no problem creating the first 25 appointments, when i want to create the 26nd record i am only able to do this in the first portal, although it appears in the second portal afterwards.
            Is this normal? Can i change this?

            • 3. Re: 2 portals
              philmodjunk

              That should not be the case.

              If you have enabled "allow creation of records via this relaitonship", this will cause an "add row" to appear in your portal as a blank row for adding records. This will appear after the last row in your portal that represents an actual related record. Once you have created 25 records in the first portal, the add row should appear as the first row in the second portal.

              See the example screen shot. The bottom portal is a four row portal. The upper portals are to the same table occurrence, but the first shows rows 1 and 2 while the 2nd shows rows 3 and 4. Note how with two records in the portal, the add row shows as the top row of the second portal.

              But when dealing with a large number of records in a portal, it often becomes simpler to use a button near your portal that performs a script for adding new portal records.

              • 4. Re: 2 portals
                wheymans

                Should i use a gobal date field to create a record with a button?

                • 5. Re: 2 portals
                  philmodjunk

                  It's an option, but all you really need is a new blank record in your portal in which to enter the data.

                  A commonly used option is to sort the records so that the oldest appointments are at the bottom of the portal and the newest are at the top. Then a new portal record can be created that automatically appears as the new top portal row when you click the button.

                  It can be as simple as this script:

                  Set Variable [$ID ; value: Person::__pkPersonID ]
                  Go to layout ["appointments" (appointment) ]
                  New Record/Request
                  Set Field [appointment::_fkPersonID ; $ID ]
                  Go to Layout [original layout]

                  But you can add a global date field to your layout or inside a custom dialog and then an additional set field step can assign that date to the new appointment record if you want.