November 9, 201015 yr I have a data base of records I do a search for the found set I need then I try running the following script but it only duplicates one record. What's going wrong? I checked and the records are starting at number one. The only record that gets duplicated is record one. Here is the script. Loop Duplicate Record/Request Go to Record/Request/Page [Next; Exit after last] End Loop Any help would be appreciated. Thanks in advance.
November 9, 201015 yr Author Thanks this sort of helped. I now have a duplicate but I also have my originals mixed in with the duplicates. Can it only show the duplicates? Thanks again for your time.
November 9, 201015 yr When a record is duplicated on an unsorted list it is created at the end of the found set of records. FileMaker navigates to the newly created record. You are left at the end of the list after the first record duplication. You need a way to reliably navigate through the entire list despite always bouncing to the newly created record. Unsort Records Go to Record/Request/Page[ First ] Set Variable [ $recordPosn; Value:1 ] Set Variable [ $foundCount; Value:Get(FoundCount) ] Loop Duplicate Record/Request Set Variable [ $recordPosn; Value:$recordPosn + 1 ] Exit Loop If [ $recordPosn > $foundCount ] Go to Record/Request/Page [ $recordPosn; No dialog ] End Loop To leave only the duplicates, add these two lines at the end of the script. Go to Record/Request/Page[ First ] Omit Multiple Records[No dialog; $foundCount] Edited November 9, 201015 yr by Guest added Omit original set
November 9, 201015 yr FWIW I think it is preferable to always put the exit loop if statement as the first statement in the loop. Then you know you're never going to trigger the action if the exit condition has been met.
May 1, 20169 yr Newbies Dear TheTominator, this old post of yours has really saved me today, thank you so much...!
Create an account or sign in to comment