Prevent duplicate methods in Configurator

We are still working on classic configurator. We are testing a new one and trying to get it so that a new part number with a sequence is created for any new “configuration”. But we’d like it to reuse a previously configured part number if the inputs generated are an exact match with a previous one. It defaults to always creating a new sequence. Now we have multiple part numbers with identical methods. Is there a way to prevent this in the settings or do I need to write some logic that looks for previously generated ones to see if they already exist and if so, force that part number instead?

Thanks in advance!

two ways i have seen this done

  1. meaningful part number (This is NOT recommended unless the number of options is very small). Each answer equates to a position in the part number.
  2. create a “Hash” using a hash calculator… A Hash basically takes the contents of a set of values and returns what looks like a random value, but the same set of values will always return the same hash. So… if you put all the answers into a hash calculator, then look it up in a UD Table to see if you have ever used that hash before. If you have, then in the UD Table, it would have the sequence also stored against the hash. if found you could respond that “This is just like seq X”… An example of a hash calculation is found here: bfba0215685b756e54d6ed67031f7e72 and they kind of show an example of saving the hash with the values that generated it.
2 Likes

I think the change you’ll need to do is to build your part number programmatically and put it into a control and use the control to set the part number without utilizing the built in sequence ability. Then in building your part number you would build in intelligence in your part number so that the same choices result in the same part number.

2 Likes

I built something similar a while back. Tim’s method of using a hash calculator is probably more efficient, but mine used the same Idea. What I did was put all the values from all of the inputs in a JSON string, and saved the part number that was generated along with the JSON string to a UD Table. Then when configurators were saved, it would check for an identical JSON string in the UD Table, and use that part number, rather than generating a new one if an identical string was found.

1 Like