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

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

Recommended Posts

Posted

I am trying to write a script to identify duplicates in a FMP6 file.

The purpose of this script is massage the data so that an import using a unique sku number can happen. With multiple items with the same sku I need to make each duplicate sku serialized. For example one file has 6 items with sku 2020 but in the other fmp6 file there are 12 items with sku 2020. I need for the first file to match sku on only 6 of the items and then map over the data only to 6 of the items in the second file not all 12. It does not matter which six items of the 12 it maps over.

I have the script written so that the duplicates are shown and marked and serialized but the serialization is incorrect. Let me explain by example:

Here is a list of duplicate sku

Posted

Okay, what you want to do is create a global field which will be used as a validator to identify when the sku changes so that the loop script will know to start over, and a Second global to carry the serial number.

Freeze window

Sort Restore (by Sku)

SetField (global, sku)

Loop

If(Sku = global)

SetField (Serial, 2nd Global + 1)

SetField (2nd Global, Serial)

Else

SetField (Serial, 1)

SetField (2nd Global, Serial)

SetField (Global, sku)

End If

Go to next record request (exit after last)

End Loop

Phil

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