I wrote a workflow for Part to do this and I am happy to share.
Basically I had to create an inputfile like this:
Company,BOM,Doc,DocType,Description,FileName,XFileRef
PICO,81004-01,61026-01,ART,"Artwork, Case Body, Pico D & AD","I:\Document Control\Documents1\61026-01-B Artwork, Case Body, Picometrix D & AD.dwg",1
Where BOM the PartNumber, DocType is the Document Type (you'll need to prepopulate this lookup data), Description is the Attachment Description (XFileRef.Description I think), FileName is the XFileRef.FileName (I think), and XFileRef is the ID of the XFileRef.
The update happens in Part.Update and populates fields in the PartAttachment section of the PartDataSet.
The XFileRef ID is the kicker. I couldn't figure out a way to get the system to automatically assign a new XFileRef, so I basicially normalized my attachments list, gave them IDs, and then did VLOOKUP() in Excel to get the ID. If I didn't do this, then every Attachment got a new ID, even if the filename was the same as previous file that was attached. My DocControl folks wanted a one to one relationship between the XFileRef ID and the file, so they could do a "where used" lookup on the attachments.
Since I did this last summer I've learned from folks here that sometimes you have to put "0" in as the ID when you're creating a new item in Vantage, so perhaps I could now rework this and get the behavior I needed.
The workflow does this:
GetPartByID. If Part Exists, Call Part.Update after mapping input data to PartDataSet. If doesn't exist, or Part.Update fails, create a Task and move on.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of keithfwalter@...
Sent: Wednesday, September 02, 2009 6:33 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Attach Files to Part and PartRev 8.03.407 using Service Connect or Direct to SQL
We are going-live soon, and need to attach our documents to the Part table for Purchased items, and to the PartRev table for Manufactured items. We have 5000+ files to attach to about 3000 different parts.
Has anyone done this? Does anyone have any suggestions? Would love to use Service Connect if I can get a package from someone :). Any other methods or idea's? Can these go directly into SQL Server?
Any help is appreciated!!!!
Keith Walter
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Basically I had to create an inputfile like this:
Company,BOM,Doc,DocType,Description,FileName,XFileRef
PICO,81004-01,61026-01,ART,"Artwork, Case Body, Pico D & AD","I:\Document Control\Documents1\61026-01-B Artwork, Case Body, Picometrix D & AD.dwg",1
Where BOM the PartNumber, DocType is the Document Type (you'll need to prepopulate this lookup data), Description is the Attachment Description (XFileRef.Description I think), FileName is the XFileRef.FileName (I think), and XFileRef is the ID of the XFileRef.
The update happens in Part.Update and populates fields in the PartAttachment section of the PartDataSet.
The XFileRef ID is the kicker. I couldn't figure out a way to get the system to automatically assign a new XFileRef, so I basicially normalized my attachments list, gave them IDs, and then did VLOOKUP() in Excel to get the ID. If I didn't do this, then every Attachment got a new ID, even if the filename was the same as previous file that was attached. My DocControl folks wanted a one to one relationship between the XFileRef ID and the file, so they could do a "where used" lookup on the attachments.
Since I did this last summer I've learned from folks here that sometimes you have to put "0" in as the ID when you're creating a new item in Vantage, so perhaps I could now rework this and get the behavior I needed.
The workflow does this:
GetPartByID. If Part Exists, Call Part.Update after mapping input data to PartDataSet. If doesn't exist, or Part.Update fails, create a Task and move on.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
    bspolarich@... ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of keithfwalter@...
Sent: Wednesday, September 02, 2009 6:33 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Attach Files to Part and PartRev 8.03.407 using Service Connect or Direct to SQL
We are going-live soon, and need to attach our documents to the Part table for Purchased items, and to the PartRev table for Manufactured items. We have 5000+ files to attach to about 3000 different parts.
Has anyone done this? Does anyone have any suggestions? Would love to use Service Connect if I can get a package from someone :). Any other methods or idea's? Can these go directly into SQL Server?
Any help is appreciated!!!!
Keith Walter
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links