Ron,
What I did was created a drop down box with all our customers which drive the prefix for our parts and docs. I also add this field to the Part & Document ItemTypes so that we can search by the customer field as well. I have included my script below for our Document form.
<script>
function getNumber() {
var newNum="";
var strCustPart="Default Part"
strCustPart=document.forms[0].customer_doc.value;
newNum=top.aras.getNextSequence('',strCustPart);
newNum = newNum;
handleItemChange("item_number", newNum);
// document.getElementById("seqButton").style.display="none";
}
</script>
<a id="seqButton" href="javascript':getNumber();"><img src="../images/icons/16x16/16x16_sequences.gif" border="0" ></a>
As you can see, I created a strCustPart variable which stores the value of the drop down box, that value then gets passed to the getNextSequence function. The end result is a Part or Document number related to our Customer.
I know this is not exactly what you are trying to do, but I hope that gives you some insight.
Good Luck,
Tom Hedberg, Jr.
Advatech Pacific, Inc.
Thomas D. Hedberg, Jr.
Engineer II
Advatech Pacific, Inc.
Analysis & Design Division
thomas.hedberg@advatechpacific.com
480.598.4005 x414 office
480.598.6767 fax
www.advatechpacific.com
"Changing the Way Engineering is Conducted"