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.

Script to duplicate current portal row and then set cursor in specific field

Featured Replies

I have 3 tables: SoldJobs, Labor, and Employees.

These 3 tables are related:

SoldJobs----------->(Allow/Delete)Labor<----------------Employees

On the SoldJobs layout, I have a portal using the SoldJobs_Labor relationship.

The portal fields are as follows:

Date - EmployeeID - EmployeeName - HourlyRate - Hours - TotalLaborCost - CostedTo

When the user enters data in this portal, most of the time there will be quite a few rows where only the date and hours data will change.

I want to create a scripted button that does the following:

Duplicate highlighted portal row

In the newly created row, I'd like to delete the data in the Hours field, and then set the cursor so that the user can type in new data into the Hours field.

Currently, my script looks like this:

Go To Portal Row [Next] (Select Entire Contents)

Duplicate Record/Request

When I run the script, it creates a new portal row, but all the fields are blank....

Where have I gone astray?

Edited by Guest
Better description of problem

Something like the attached?

dupe.zip

  • Author

efen,

first, let me say thank you for taking the time to not only respond, but throw together an example! really appreciate that.

i'm trying it out now, and i think one of my problems was that i missed the GTRR step in my script.

i did notice: when the script gets to the step "Go To Field [labour::date], it actually inserts the cursor in the date field in the first (top) portal row, not in the newly created duplicate row. any ideas on how to fix this? i'm guessing i need to write some sort of calculation that counts the portal rows at the beginning of the script everytime.... what do you think?

In the script add

Go to portal row [select; last]

just before the last step

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.