3 Replies Latest reply on Sep 6, 2011 2:14 PM by miw

    Portal row not staying point of focus



      Portal row not staying point of focus


      I have a find layout which will ask for data for a field based on a list.  Once selected, I have a portal which lists all those records meeting the find data.  It seems to work out just fine except that even though I have the script "Go to Portal Row [Select; First], that first portal row does not always remain the focus in the layout.  I cannot figure out why.  When I run the script debugger, the focus goes to the first row when told.  Here is my script once the find is completed:


      Go to Object  [ObjectName: "NamePortalSearch"]

      Go to Portal Row [Select; First]

      Exit script 

      Once the portal is populated, how do I get the top row to be the focus?


        • 1. Re: Portal row not staying point of focus

          In layout mode, when you click on the portal (not a field or other object in the portal) do you see NamePortalSeach appear in the name box of the Inspector's position tab?

          What user and/or script actions take place before the go to object step?

          • 2. Re: Portal row not staying point of focus

             In layout mode, the name of the portal in the position tab has been named NamePortalSearch so that should work fine in my Go to Object step.

            The full script is:

            If [Name::kfTempName =/ ""]   **note that =/ denotes a not equal sign here**

            Enter Find Mode

            Set Field [Name::LastName;"==" & Name::kfTempName]

            Set error capture [On]

            Perform Find []

            Go to Object  [ObjectName: "NamePortalSearch"]

            Go to Portal Row [Select; First]

            Exit script


            In the script debugger, I see the first row of the portal get highlighted but that record does not remain the active record when the script ends.

            • 3. Re: Portal row not staying point of focus

              Doh...  I figured out the error in my portal and layout.  My portal was for the table "Name2" in my layout for the table "Name".  I merely needed to add after the Go To portal [Select; First] script line a Go To Related RFecord [From Table "Name2"; Using Layout <current layout>].  Now it works as desired.