Jump 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.

Scripting data entry in new portal row

Featured Replies

I am trying to create a script that will go to the next row of a portal (thus creating a new, related record) and enter data there. For some reason, no matter what portal commands I use, I cannot get past the last row that already has data in it. 

 

Any advice on how to create this new record in the portal through a script would be appreciated.

 

Thank you.

For some reason, no matter what portal commands I use, I cannot get past the last row that already has data in it.

 

In the relationship the portal is based on, the option to "allow creation of related records via this relationship" must be checked for the portal TO; otherwise you'll not be able to create a related record in the portal, manually or per script, because you'll only see existing records. 

 

Activate that option, and give the portal an object name in the Inspector palette. Once these prerequisites are in place, you can simply script …

Go to Object [ objectNameOfPortal ]
Go to Portal Row [last ]
Set Field [ portalTO::someField ; "someValue" ]

… because the last portal row in a portal whose relationship allows creation is the “spare row” used to create new related records.

  • Author

Thank you for the ideas. I had the relationship set up correctly, but it was still stopping at the first row and changing the data there. I just set up an "If empty" on one of the fields in the row, and instructed it to perform the script, but if not go to the last row, and it seems to be working.

 

Thank you.

Here is a technique that you might like better than the "go to last portal row" method. (see the attached sample).

 

I started using this technique for all of my data entry into portals and my users seem to prefer it over the "go to last portal row" method. Especially if there are a lot of line items in the portal, as this method eliminates the need for scrolling.

new_portal_record_with_portal_filtering.zip

Create an account or sign in to comment

Important Information

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

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.