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.

Adding a new record in place

Featured Replies

I need to create a script that will add a new record in a protal at the line where the cursor is situated. The new record step just throws me to the last line of the portal. Am I missing a step somewhere . Any help would be really appeciated.

Many thanks

This worked for me a couple of times:

Make a field called SortOrder in the related file. Make it a serial number field, incrementing by 100 (10,20,30...) Have your portal sorted by sort order.

Put an "Insert" button in each portal row. Have it call a script. The script should:

-store the currentportalrow in a global field.

- get the sortorder value from the current portal row, store it in a global field.

- go to the next portal row and grab THAT sortorder. Then average the two and store the result in the global field. This is your new record's Sort Order.

- Call a script in the related file that'll create a new record then set it's sort order to the average you just calculated. That'll put it between the two when sorted.

- refresh the main file and go to the portal row you stored in the first step. then go to the next portal row and you should end up on the newly created row.

You might want to put a catch in the first script in case a bunch of rows get inserted. Test to see if row 1 and row 2's sort orders are within 1 or 2 of each other. If so, sort the related file by sortorder then reserialize it.

Jeff

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.