Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Deleting Duplicate Records in Portal


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

Recommended Posts

Posted

I am trying to write a script where duplicate dates in a portal are deleted. For example I have a database of people and related table of Attendance dates. Sometimes through an automated process, duplicated dates might get entered in a person's record in the portal. Is there a way to have a script that automatically finds those duplicates in the portal for that one person and deletes the duplicate dates? This could be a sub-script that is incorporated with the script that records the attendance in that portal field. Thank you.

Posted

do an advanced search for +duplicate +records and you will comes across many techniques on how to do this. Since a portal is simply a window into the related records, you can have it scripted to go to the related records and delete out the dups.

Posted

Ok, I have spent the last 1/2 hour looking, and I can't find one that relates to what I'm doing. Do you have a particular illustration in mind. I tried searching for an hour before I posted this question. Unfortunately, when you search for this topic, I get hundreds of posts to search through. Thank you.

Posted (edited)

Alight I know I'm a novice at this. I am trying a different way, instead of deleting duplicates, I put in something that prevents a duplicate. But what I have tried so far only checks the first row of the portal. I have tried loops, but can't seem to get them to work. Could someone tell me what I am doing wrong. This works only if the top portal record = the same date.

I have in the script:

Copy [select; AttenDate::AttenDate]

if [FamAtten::AttenDate ≠AttenDate::AttenDate]

Go to Portal Row [Last]

Paste[]

End If

I guess the question is, how do I keep it going through all portal records to check for the date, and if it does not find it, then paste?

Thank you for your help

Edited by Guest
Posted (edited)

This might help your initial desire. You'll have to create a self-joining relationship with each person and their duplicated attendance date.

Let's call it "selfjoin-dates." You'll then replace the "keys_UID_c_SELFJOIN::UID_key_c" in the EXIT LOOP IF statement with "selfjoin_dates::datefield" and place selfjoin_dates::datefield in the portal.

See the following for the way it was done in Filemaker 6. You'll need to add the "commit" step, I believe, to keep it valid in FM9

http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=848&p_created=1115172475&p_sid=Meq9qnZi&p_accessibility=0&p_redirect=&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9Nzk0LDc5NCZwX3Byb2RzPSAmcF9jYXRzPSZwX3B2PSZwX2N2PSZwX3BzX2Fuc191cGRhdGVkPSZwX3BhZ2U9MSZwX3NlYXJjaF90ZXh0PWRlbGV0aW5nIGR1cGxpY2F0ZXMgcG9ydGFs&p_li=&p_topview=1

FileMaker_Pro_Advancedaudac001.jpg

Edited by Guest
Posted (edited)

Also, it would be a good idea to sort multiple records and set the GO TO PORTAL ROW to "last" rather than next as it will save a script step in the loop.

Edited by Guest

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