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

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

Recommended Posts

Posted

Hello, I'm using a script originating from the Filmaker website that is suppose to do exactly what I need:

 

http://help.filemaker.com/app/answers/detail/a_id/3441/kw/finding%20duplicate%20records

 

 

 

Show All Records
Sort Records [specify sort order, Perform without dialog] Sort by Client ID in ascending order
Go to Record/Request/Page [First]
Replace Field Contents [Perform without dialog, Specify target field 'Mark', " "]
Loop
  Set Variable[$id,'ClientID']
  Go to Record/Request/Page [Next, Exit after last]
  If ['$id = ClientID']
     Set Field ['Mark', '"X"']
  Else
     Set Variable[$id,'ClientID']
  End If
End Loop
Perform Find [Restore] Find records when Mark = X

 

 

 

The attachment  is what I have in my database:

 

 

The script will not write an X as it goes through the list (~123000 records).  I've used the debugger to 'step into' the lines and I can see the duplicate clientID's but it just jumps through leaving no "X" in the cell .... It's 'showing' and 'sorting' correctly .... any thoughts on if this is a mistake or what I could do differently?

Thanks very much!

Lance

  1.  

 

fmp script issue.tiff

Posted

Your script looks ok. make sure the field has the correct type in it... ie... if its a number field and it has text or non number characters in it, your sort will not be correct...

can you confirm your sort is ok

Posted

The field contains a number and it is set to 'number' .... the sort appears correct:  you see the duplicates together ... it's just the writing "X" in the "Mark" field that's not happening ....

Posted

So I checked the "Mark" field and it is not 'text' ... so I changed that and discovered something:  When the script runs it results in all the doubled fields showing an "X" ... that way you can delete them ... I was expecting JUST the second field to be "X" and the all the fields still visually there ... so it appears that it's working now.  Thanks very much for the heads up around field type etc.

L.

  • 2 weeks later...

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