6 Replies Latest reply on May 14, 2015 2:56 PM by jdevans

    ?? Where to see The Script Parameter for a PopOver button

    jdevans

      Title

      ?? Where to see The Script Parameter for a PopOver button

      Post

      Someone was helping me get started on the solution I'm working with, and now I need help commenting, documenting what is currently going on. Especially the stuff the other person did.

      I noticed that one script that this other person wrote has the following as its first step:

      Set Variable [$id; Value:Get (ScriptParameter)]

      This script runs when a PopOver button is clicked. I think what he did is to use a Script Parameter to give a title to the list of values that appear in the PopOver.

      Where can I go to see where the Script Parameter was entered/set? I've looked and searched all over, and can't find it.

      I tried creating a new PopOver button to see the first opportunity I might have to enter a value for a Script Parameter... which is  a right-click on the button, then "Set Script Trigger."

       

      So I checked that on this existing button and nothing is entered or selected for Set Script Trigger.

       

        • 1. Re: ?? Where to see The Script Parameter for a PopOver button
          jdevans

          Also is it possible to view script parameters in the Data Viewer? I have FMP13 Advanced.

          • 2. Re: ?? Where to see The Script Parameter for a PopOver button
            philmodjunk

            You can see script parameters in the data viewer if you also run the script when the debugger is enabled. Click the button and when the script step that uses Get ( ScriptParameter ) pops up in the script debugger, enter the same expression Get ( ScriptParameter ) into the data viewer as a watch expression and you'll see what value is returned.

            The trick with script triggers on popovers is that you don't normally want to set them up on the popover button, but on the popover panel. In Layout mode, open the popover, right click the border of the popover panel and you should see what is probably an OnObjectEnter trigger set on the panel and if you click "select", you'll get a dialog where you can see what expression or value was used to specify as the script parameter.

            • 3. Re: ?? Where to see The Script Parameter for a PopOver button
              jdevans

              Not finding anything. When I right click on either of these, I see in the list of choices a "Portal Setup" for the inside-selected object. I didn't think that was what you meant.

              So on the outer-object, I get as a choice on right click "PopOver Setup" which can have a Script Parameter but doesn't already have one defined.
               OR, on the same right click on the outer-object, I can select Set Script Trigger which also doesn't have a Parameter set. Dead-ends everywhere.

              I kind of think that there may be a parameter set somewhere else, and it is reading it here. But I'm clueless as to where.
               

              • 4. Re: ?? Where to see The Script Parameter for a PopOver button
                philmodjunk

                No it wasn't. Does not sound like you clicked the border of the popover panel if you see portal setup.

                I can select Set Script Trigger which also doesn't have a Parameter set.

                But do you see that a script trigger such as OnOBjectOpen was set? As I stated previously, to see the script parameter, you would click the select button to open the dialog where you select a script for the script trigger. There's an "optional script parameter" box inside that dialog that shows you the script parameter expression.

                And if all else fails, follow the steps that I outlined for using the script debugger and data viewer.

                That will show you bot the script parameter value and the exact name of the script trigger used to perform the script.

                • 5. Re: ?? Where to see The Script Parameter for a PopOver button
                  jdevans

                  When I click on the Panel/Popover Frame, this is what I see...(nothing selected).

                  • 6. Re: ?? Where to see The Script Parameter for a PopOver button
                    jdevans

                    I FOUND IT....

                    Layout Mode> Double click the popOver button, which displays the popover....

                    Double click the FIELD which is inside the portal, which is inside the PopOver. The Field has a script parameter. I found it using the data view and Debugger as you mentioned. The script didn't fire until I made a selection inside the popover. That's what clued me in to just the field itself, not the popover, or button. The filed has a PerformScript selected. Clicking Specify on that, and there it was.

                    Thanks for your help PhilModJunk :)