AnsweredAssumed Answered

Lengthly question about duplicate field data

Question asked by reverend on Dec 8, 2018
Latest reply on Dec 9, 2018 by LaRetta_1

I would like to start out with a thank you to all of you for the suggestions and clarification regarding the options for the lookup function.

 

I now utilize the Auto-Enter function to serialize the record number entry.

 

Now, with that behind me, I am finding issues with eliminating duplicate entries in separate fields on the same record.

 

I have “X” number of fields of which these fields are populated by specifying the field(s) as calculation/Int(random) function.

 

To eliminate duplicates I use this simple script:

 

Loop

 

New Record/Request

 

If [ Layout::F#2 = Layout::F#1 or Layout::F#3 = Layout::F#1 or Layout::F#4 = Layout::F#1 or Layout::F#5 = Layout::F#1 or Layout::F#3 = Layout::F#1 or Layout::F#3 = Layout::F#2 or Layout::F#3 = Layout::F#4 or Layout::F#3 = Layout::F#5 or Layout::F#4 = Layout::F#1 or Layout::F#4 = Layout::F#2 or Layout::F#4 = Layout::F#3 or Layout::F#4 = Layout::F#5 or Layout::F#5 = Layout::F#1 or Layout::F#5 = Layout::F#2 or Layout::F#5 = Layout::F#3 or Layout::F#5 = Layout::F#4]

 

Delete Record/Request [no Dialog]

 

End If

 

Exit Loop If [Layout::TotalRecNum=Layout::MaxReqGen

 

End loop

 

As you can see in this example the fields on the left are the serialized record numbers and some serials have been omitted due to duplication. My initial total record request number was 10 records. This script had to produce 15 records in order to get my 10 record requests without any duplicate fields.

 

 

In this example, again, my record request number was 10 records and it took 16 record generations to satisfy my request although record 16 did not trap the duplicate field value.

 

 

By specifying the fields to be numbers and utilizing the Options function and choosing Auto-Enter/Calculated Value and then specifying the random number generator calculation and selecting the Unique Value check box, I can avoid this issue by trapping all duplicate fields.

 

So far so good but the Unique Value function pops up a native Filemaker dialog box.

 

 

This interferes with the streamline function of the application. By selecting the “YES” button as many times needed, the script will complete without duplication in any field in any record. I have tested up to 100 records with as many of 144 serials created.

 

By including the function Set Error Capture in my script to ignore this dialog box, the script seems to hang and when interrupting the script I get a varying number of records less than requested but never the number of records requested.

 

I hope this write up was clear to all viewers.

 

Any thoughts?

 

Regards.

 

- rev -

Outcomes