10 Replies Latest reply on Mar 23, 2016 3:32 PM by rgordon

    Keeping a Popover open


      I want to keep a Popover open for data entry and not have it close if the user clicks outside of the Popover.  I want the only way to close the Popover to be a button inside the Popover.  That way I can force the user to provide necessary data and then consciously press the button in the Popover to accept data entry.  How can I keep the Popover open in such a manner?

        • 1. Re: Keeping a Popover open

          Create a trigger script on the popover itself (not the button) for the "OnObjectExit" trigger.


          Exit the script with a result of false, UNLESS the action is flagged as coming from your button inside of the popover.


          For instance, the trigger script would be:

          If [ $$trigger <> 1 ]

            Exit Script [ False ]


            Exit Script [ True ]

          End If

          and the close popover button script would be:

          Set Variable [ $$trigger ; 1 ]

          Close Popover

          Set Variable [ $$trigger ; "" ]

          • 2. Re: Keeping a Popover open

            Write a script and use it as a trigger script for the popover panel, and for your button.


            Basic form:


            # [ for Panel script trigger OnObjectEnter, with parameter "enter" ]

            If [ Get ( ScriptParameter ) = "enter" ]

              Set Variable [ $$KeepOpen ; 1 ]

            End If

            # [ for Panel script trigger OnObjectExit, with parameter "exit" ]

            If [ Get ( ScriptParameter ) = "exit" ]

              If [ $$KeepOpen ]

                Halt Script

                # [ or Exit Script [ result: False ] ]

              End If

            End If

            # [ for an OK button inside the panel, with parameter "OKButton" ]

            If [ Get ( ScriptParameter ) = "OKButton" ]

            # [ perform your checks ; exit if data is incorrect; otherwise …]

              Set Variable [ $$KeepOpen ; "" ]

              Close Popover

            End If


            As you can see, using script parameters allows you to use the same script for different objects / purposes. More neat IMO to have all the functionality inside a single package.


            EDIT: Hi Mike, didn't see your post while writing the post.

            • 3. Re: Keeping a Popover open

              Here is a script similar to Erolst's but it doesn't require an OnEnter script trigger


              If [Get(ScriptParameter)= "trigger"] //this is for the on exit script trigger

                 If [$$close=1]

                      Close Popover

                      Set Variable [$$close; Value: ""]

                 End If

                 Halt Script

              Else  // the else is for the button in the popover

                 Set Variable [$$close; Value:1]

                 Close Popover

              End If

              • 4. Re: Keeping a Popover open

                Wish I could click two posts as being correct.  Using MB's first post (before I saw yours) I essentially did what you proposed putting everything in one script with various script triggers so its all in one place.  This allows me to do input checks, establish other controls and quality checks before accepting the data in the popover to be actually recorded in the underlying record.  Thanks everyone.

                • 5. Re: Keeping a Popover open

                  I wish we had a script step


                  SetTriggers [on] / SetTriggers [off]


                  so that the trigger script would be Exit Script [false]


                  and the close button script would be



                  Close Popover


                  • 6. Re: Keeping a Popover open

                    Your comments got me think that there had to be an easier way to keep the popover open.  It can be done with 4 steps.

                    IF [Get(scriptparameter)="button"]

                         close popover

                    End If

                    Halt Script


                    The close button in the popover gets the script parameter of button and the OnExit trigger gets the Script parameter of Get(scriptparameter)

                    • 7. Re: Keeping a Popover open

                      and these are the grill mitts you should be wearing when using Halt Script:




                      • 8. Re: Keeping a Popover open

                        No need for mitts if I don't have any other scripts running.

                        • 9. Re: Keeping a Popover open

                          Try this example file.

                          • 10. Re: Keeping a Popover open

                            Since the Halt Script step might be a little too hot to handle, how about this instead.


                            If [Get(scriptparameter)="button"]

                                 close popover

                            End If

                            Exit Script [Result:0]