3 Replies Latest reply on Aug 9, 2012 6:59 AM by MichaelMoul

    Problem running supposedly compatible script with IWP

    MichaelMoul

      Title

      Problem running supposedly compatible script with IWP

      Post

      Hi,

      I've written a project management database for the high school newspaper that I advise to track articles through the writing process.  I'm having a problem running one of the scripts over Instant Web Publishing.  Filemaker is telling me that all of the script steps are compatible with IWP, so I'm stumped as to why it isn't working.

      The script is accessed through a button on a layout called "Article Information," which references the "Articles" table.  There's a portal on that layout that accesses a related table called "Notes."  This portal allows a user to leave a note about the progress of the article, and also records the user that created that particular note, as well as the date and time of creation.  The fields in the Notes table are SerialNumber, ArticleID (which is the field that relates to the article table), Name, Date and Time.  The script is designed to create a new record in the notes table, assign the user's name to Name, and the current date and time to the Date and Time fields.

       

      The code for the script looks like this:

      Set Variable [$ArticleNumber; Value:Articles::zzArticleID]

      Go To Layout ["Notes" (Notes)]

      Set Field [Notes::Name; $$FullUserName]  #This variable is set by a startup script also compatible with IWP

      Set Field [Notes::Date; Get(CurrentDate)]

      Set Field [Notes::Time; Get(CurrentTime)]

      Sort Records [Restore, No Dialog]   #This step sorts the table in descending order of time; recent on top

      Go To Layout [original layout]

       

      The script works fine when I run it on the desktop version of Filemaker Pro 12, but doesn't work with on IWP.  Frustratingly, it USED to work on IWP.  It stopped working when I stopped hosting the database on my MacBook Pro, and switched over to a PC.

       

      Anyone have any ideas why the script no longer works?  Or if something else might be causing the problem?

       

      Thanks very much!

      Michael

        • 1. Re: Problem running supposedly compatible script with IWP
          Sorbsbuster

          You are right that everything you post looks ok, but I don't think you've posted everything that is relevant to the problem.  For example, the script steps posted never use the variable $ArticleNumber, so I'm assuming there may be other steps missing.  Also, when you say 'it isn't working', which part of it doesn't work?  (And after creating the note, why do you sort the found set?)

          • 2. Re: Problem running supposedly compatible script with IWP
            philmodjunk

            And I would expect to see a new record created to record the data that makes up the new note. WHere is that step?

            • 3. Re: Problem running supposedly compatible script with IWP
              MichaelMoul

              Hi again,

              The two steps you asked about were in the the original script.  Not sure how I left these two clearly important steps out during my first post.  I double checked it, too. I'm sorry to have wasted your time with that first post!

              But as I was typing out my response to Sorbsbuster's question "what, excatly, doesn't work?" I answered my own original question.  I had been typing "nothign works!  It won't even go to the notes layout, which is the second step of the script."  And as I was verifying to make sure that that statement is, indeed, true, I noticed that I had neglected to change the Notes layout to the "Classic Theme," which is not the default, but is the only one supported by IWP.  And once I did that, it started working again.

              Anyway, thanks for asking the right questions and making me properly think through the whole thing!

              Michael