2 Replies Latest reply on Feb 5, 2015 6:59 AM by philmodjunk

    How can I run a script when a portal row is clicked?

    Vicspidy

      Title

      How can I run a script when a portal row is clicked?

      Post

      I've two portal on a layout. I need to modify contents of the second portal based on the active row of the first portal. Is there a way to do it?

        • 1. Re: How can I run a script when a portal row is clicked?
          SteveMartino

          Just to make sure we're on the same page.  When you click on a row in Portal 1, you want to modify something in a second portal.

          Could get quite tricky. 

          How do you know which row/field in the second portal to go to?

          How are the records related?

          Do you need to enter/modify data in the first portal?  If not, you could simply put a transparent button over the entire portal row.  When the user clicks it, you would capture the data you need in portal 1 with set variable step(s), navigate to the proper record/row in Portal 2, and use the set field step(s).  You may also need a commit records and/or refresh window script steps.

          Some screenshots and a better explanation using exact words will help some more.

          • 2. Re: How can I run a script when a portal row is clicked?
            philmodjunk

            The usual method is to either take the field or fields in the row of Portal 1 and set  them up as a button using button setup, or you put an invisible rectangle on top of the fields in the portal row and set it up as a button.

            But an OnObjectEnter trigger set on one or more fields in the portal row could produce the same results.

            The button click will do two things: a) Obviously it performs your script, but b) it also sets the focus on a specific row of the portal. Your script can refer to fields in the portal table and these references will refer to the fields of the portal row that you selected with your mouse click. Many of these scripts capture values from the portal record in variables or global fields at the beginning of the script while the focus is still on that portal row so that this data can then be used in the rest of the script--such as bringing up detail records in a different portal.