5 Replies Latest reply on Sep 25, 2012 1:30 PM by philmodjunk

    Help Sort Script to Execute in IWP

    DebraSeay

      Title

      Help Sort Script to Execute in IWP

      Post

           My Sort Selection box does not sort when I publish my database to IWP. I have found that I need to have my Sorts saved with the script to execute in Instant Web Publishing. I can not figure out how to do that. Can anyone help me?

           thank you.

        • 1. Re: Help Sort Script to Execute in IWP
          philmodjunk

               Do you know how to create scripts?

               The Sort Records script step is pretty straight forward and you can add a button to your script that sorts the records in a specific order so I am not sure exactly where you need assitance with that.

               Such a script step only sorts records in a particular order so if you want the user to be able to select different sort orders, you need to use either a different button for each such sort order or a field with a value list and a single button whose script uses the value in the field to determine which Sort Records script step to use to sort the records.

          • 2. Re: Help Sort Script to Execute in IWP
            DebraSeay

                 I am in the Content Management template. The "Sort Selection" button has already been set up on the Content page.  I have edited the records to match what I want to sort. It works on the FMP software, but when I go to use it in Instant Web Publishing, it does not sort the records.  I have researched what needs to happen, "Sorts must be saved with the script to execute in Instant Web Publishing." I just dont know how to execute the script so it behaves like it does when I and in the FMP program.

            • 3. Re: Help Sort Script to Execute in IWP
              philmodjunk

                   Sort Selection is a drop down list with a script trigger that performs a script. The sorts are "saved with the script" it merely uses the value selected in the drop down to determine which saved script to perform to sort the records. Thus, your sorts are already saved with a script and this does not explain why it doesn't work in IWP.

              • 4. Re: Help Sort Script to Execute in IWP
                DebraSeay

                     Thanks. Can anyone else give me any suggestions on what to do?

                • 5. Re: Help Sort Script to Execute in IWP
                  philmodjunk

                       Apologies for missing the obvious, but the issue is the Script Trigger, not the sort. Script triggers cannot be tripped directly by user interaction with their web browser like you can when interacting directly with the layout in FileMaker Pro.

                       The script being performed by this trigger is called: Trigger | Sort Content List

                       If you add a button next to the drop down and set it to perform this script, then in IWP, you can select a sort order and then click the button to sort the records.