February 21, 200817 yr 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.
February 21, 200817 yr 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.
February 21, 200817 yr 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.
February 22, 200817 yr 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 February 22, 200817 yr by Guest
February 27, 200817 yr 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 Edited February 27, 200817 yr by Guest
February 27, 200817 yr 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 February 27, 200817 yr by Guest
Create an account or sign in to comment