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?)
And I would expect to see a new record created to record the data that makes up the new note. WHere is that step?
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!