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.

Deleting Duplicate Records in Portal

Featured Replies

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.

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.

  • Author

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.

  • Author

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

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

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

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.