Link to home
Start Free TrialLog in
Avatar of c0link
c0link

asked on

Duplicating a portal row/record in Filemaker

I want a script that takes me to a portal row and then duplicates the portal row. The navigation part of the script which takes me to the selected row works fine. With the cursor blinking at me in the correct row, on implementing Duplicate Record from the menu (to test the action), all records disappear from view in the portal and all other portals on the tab control go blank as well. The cursor ends up on the main record.

Having selected the portal row I cannot understand why this should happen. Can anyone advise me as to why this should happen and not simply reproduce the record?

Incidentally, no duplicate record shows up in the underlying table.  
ASKER CERTIFIED SOLUTION
Avatar of webwyzsystems
webwyzsystems

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_908359
duplicating a record duplicates the current record of the current table on which the current layout is based, even if you are currently selecting a portal row.

to duplicate a related record, there are several ways, the simplest is:
(from the portal raw)
goto related record, using the related table layout
duplicate record
goto layout (original)
Avatar of c0link
c0link

ASKER

Simple is very good.
Now I know the flow it works well. Also explains why the blanks. It was because by trying to duplicate the linked record it could not recreate a unique value field, hence it blanked.

Freeze window is another useful tip to remember.

Thanks a lot.
Avatar of c0link

ASKER

Received this after another solution (same) presented. Understanding what was actually being duplicated explained everything.

Thanks for your feedback.
I had not seen the 1st solution, it's been posted while I was typing mine... EE needs ajax!
just a remark about: "for some reason the relationship key for all the portals is lost."
makes sense, when you duplicate the current record, the ID is changed, so related records are not the same for the dupped record.