Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go to Portal Row-script does not work

Featured Replies

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

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.

  • Author

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

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]

  • 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

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.