Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6209 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

Main and Sub are separate files. Both files have IWP on, also the account privileges in both files allow access via IWP.

Posted

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]

Posted

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

Posted

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

This topic is 6209 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.