I posted this a while back but still cant seem to be able to get it working.
I have serveral product lines (ex: shoes, shirts, and pants). Each line has its own product number, shoes are the 1000 series (with id numbers being 1001, 1002, 1003...), shirts are the 3000 series (with id numbers being 3001, 3002, 3003...) ETC.
I want to automagically generate the next product id when I select the product type from a drop down box.
In code I guess it would look something like this:
IF ProdType = "Shoes"
THEN ProdID = >ProdID WHERE ProdType = "Shoes" +1
So therefore if I selected Shoes as the type but already has 2 records for shoes, filemaker would recognize 1002 as the highest number associated with the product type shoes and add 1 to give me 1003.
HOW DO I DO THIS?
I have serveral product lines (ex: shoes, shirts, and pants). Each line has its own product number, shoes are the 1000 series (with id numbers being 1001, 1002, 1003...), shirts are the 3000 series (with id numbers being 3001, 3002, 3003...) ETC.
I want to automagically generate the next product id when I select the product type from a drop down box.
In code I guess it would look something like this:
IF ProdType = "Shoes"
THEN ProdID = >ProdID WHERE ProdType = "Shoes" +1
So therefore if I selected Shoes as the type but already has 2 records for shoes, filemaker would recognize 1002 as the highest number associated with the product type shoes and add 1 to give me 1003.
HOW DO I DO THIS?