1 Reply Latest reply on May 4, 2012 11:59 AM by philmodjunk






      Hello.  I have added a portal to a database I'm designing.  I've got all the fields on it I want and all is okay that far.  What I wanted to know was is there a way to keep the blank line for adding new info at the top as opposed to it moving to the bottom of each row entered?   

        • 1. Re: Portals

          No, but you can set up something that looks like you have.

          Remove the "allow creation..." option from the relationship. (This way you won't see the extra blank row in the portal.)

          Define a global field to correspond with each field in the portal row.

          Use this script to add the newly entered data into the portal:

          Freeze window
          Set variable [LayoutTableOccurrence::PrimaryKey ; value: $ID ]
          Go to Layout [Portaltable]
          New Record/Request
          Set Field [PortalTableOccurrence::Foreignkey ; $ID]
          Set Field [PortalTableOccurrence::field1 ; YourTable::GlobalField1]
          Set Field [POrtalTableOccurrence::field2 ; YourTable::Globalfield2]
          and so forth for each portal row field...
          Set Field [Yourtable::GlobalField1 ; "" ]
          Set Field [Yourtable::GlobalField2 ; "" ]
          and so forth for each global field
          Go to Layout [original layout]

          You can use an "add" button to perform this script or maybe a script trigger or two on the global fields could do the same.