Proposing a Summary solution for JMP users on the beginner (my) side of the spectrum.
In this example we want a list of unique finished goods from a list of customer orders. I won't link the table and I'll give the Output Table a name.
On the original data table go to Tables -> Summary
![JMP Community UniqueList1.png JMP Community UniqueList1.png](https://community.jmp.com/t5/image/serverpage/image-id/16715iB14DA675CE991B72/image-size/large?v=v2&px=999)
Drag Finished Good from the select columns over to Group on the right.
Give the Output table a name, in this case UniqueFG.
Uncheck Link to original data table.
Click Action OK.
![JMP Community UniqueList2.png JMP Community UniqueList2.png](https://community.jmp.com/t5/image/serverpage/image-id/16714i22B5645CFD32BA2A/image-size/large?v=v2&px=999)
The resulting data table is a list of all unique FG and the count of rows.
Click edit Source script.
It will look something like this.
Data Table( "Test" ) <<
Summary(
Group( :Finished Good ),
Freq( "None" ),
Weight( "None" ),
Link to original data table( 0 ),
output table name( "UniqueFG" )
)
Copy that code.
Create a new script in the original data table and paste in the code. I've modified the code slightly to make it more flexible/scalable and commented in some notes below.
//Creates a list of unique FG #s to feed to SAP to get unit weights and carton quantities
Names Default to Here(1);
dt = current data table();
dt <<
Summary(
Group( :Finished Good ), //this is the column from which you want unique values
Freq( "None" ),
Weight( "None" ),
Link to original data table( 0 ), //this turns off table linking
output table name( "UniqueFG" ) // this is the name of the new datatable
)
Save.
Feel free to let me know if this is/isn't a good approach or code structure. Thanks!