January 28, 200818 yr Hi, I'm just in the process of learning to use IWP. I'm stuck with a script that does not want to work in IWP, but produces an error: "FM Web Publishing: Web Scripting Error: 101, File: "Main", Script: "SetUpData", Script Step: "Go to Portal Row" The script navigates to a correct layout, where there is just one portal with existing related records (simple one-to-one relationship) and then it should loop through portal rows and copy a set of related field values into a global field. The script has a following structure: Allow User Abort [Off] Go To Layout ["Layout_5] Set Field [Main::gTemp;""] Commit Records/Requests [No dialog] Go To Portal Row [First] Loop Set Field [Main::gTemp;Main::gTemp & Sub::Field_1] Go To Portal Row [Next; Exit after last] End Loop Commit Records/Requests [No dialog] Go To Layout [Layout_1] In FMPro the script works as it should, but in IWP it doesn't. Any ideas where the problem might be? Jari V
January 28, 200818 yr is "Main" a separate file or just a TABLE? If it is a separate file, then that file "Main" should also have it's IWP turned on.
January 28, 200818 yr Author Main and Sub are separate files. Both files have IWP on, also the account privileges in both files allow access via IWP.
January 28, 200818 yr Try to commit the record after the set Field because it could be the record has not yet submitted hence "record is missing" Allow User Abort [Off] Go To Layout ["Layout_5] Set Field [Main::gTemp;""] Commit Records/Requests [No dialog] Go To Portal Row [First] Loop Set Field [Main::gTemp;Main::gTemp & Sub::Field_1] Commit Records/Requests [No dialog] Go To Portal Row [Next; Exit after last] End Loop Commit Records/Requests [No dialog] Go To Layout [Layout_1]
January 28, 200818 yr Author Thanks for the suggestion. A problem with committing a record inside a Go To Portal Row [Next, Exit after last]-loop is that after committing the script "forgets" the current active row, and the loop gets permanently stuck in the first portal row. I can't see any other way to try this, but to make some other kind of portal row navigation counter, I'll try that to see if committing solves the original problem. Jari V
February 1, 200818 yr Author Just to follow up - committing the record after Set Field solved the original problem, thanks. The subsequent problem of Go To Portal Row [Next; Exit after last]-loop forgetting its row after Commit Records was easily fixed with a calculation based looping counter. Jari V
Create an account or sign in to comment