Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Find then Show All


Jim_Shelton

Recommended Posts

In FM 8.5, I need to sort all duplicates to the top, and yet show all records from an import. The records being imported have a control number that matches all duplicates. The ending result will be to export as a .txt file.

 

I can show all duplicates, but how to I then have the non duplicates show at the below all the duplicates?

 

thanks

 

Jim

Link to comment
Share on other sites

Have an auto-enter text field with a value of g.GlobalField X. Set g.GlobalField X to Get(CurrenttimeStamp) just before you import. When you import, enable auto-enter options during the import process. Then do a Find for records that are duplicates, plus records where NewTextField = the value that's in g.GlobalField X.

 

That ought to work, unless there's a reason that you don't want to enable auto-enter options during import.

Link to comment
Share on other sites

I do not mind enabling auto enter, but would that not give each record the same user stamp? When I tried it all records showed, but the duplicates were no longer separated as a group.

 

Jim

Link to comment
Share on other sites

You say you have a control number that matches all duplicates. I assume it's a separate field. If that control number is a constant, you could sort by that field, specifying a value list that contains that constant and nothing else.

 

However, you need the non-duplicates to be non-empty, or they will sort to the top. So you could add an auto-enter calc field definition that sets the field to "0" if it's empty.

Link to comment
Share on other sites

I do not mind enabling auto enter, but would that not give each record the same user stamp? When I tried it all records showed, but the duplicates were no longer separated as a group.

 

Jim

 

If the duplicates are in the system FIRST and THEN you import the other records, the duplicates should be at the TOP of the final found set.

 

If you mean that some of the duplicates will be among the imported records, that's a different story, but that's not what I understood you to be saying.

Link to comment
Share on other sites

Hunter sorry for any miss guidance. The dupes already exists in the file to be imported. (They are necessary for another process.)

 

I created a new field that does receive a time/date stamp. I do a find, replace contents of the date stamp then show all records, then sort. Multiples come to the top.

 

May not be pretty, but I got it there.

 

Jim

Link to comment
Share on other sites

Dont' import that file.

 

Use this technique instead. That thread pertains to how to do it in FileMaker 4, but the underying approach is still entirely applicable. If you have some friction trying to find the modern script step equivalents to FileMaker 4 commands, just ask. (At casual glance, none of the ones used there have changed, though).

 

In short, instead of importing, loop through the record set you were going to import, and do a series of Set Fields via a relationship that allows for the creation of related records. When you come to a rec that's already been included, it won't create a new rec, it will just rewrite the field values in the existing record. You'll end up with one copy each of each unique value.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use