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

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


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

Recommended Posts

Posted (edited)

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
Posted

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?

This topic is 5442 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.