Looking for advice on how to export attachments from GHR such as items uploaded for certifications, education, performance appraisals, etc. Are they physically located on the server? If so, where?
Thank you!
We had a request to bulk export Payables Invoice attachments for a list of Vendors and accomplished it by using Process Flow because the desired stored procedures are restricted in the cloud database.
We are single tenant so we were able to use a SQL Query to pull to the binary data out of the database and store it in files via a File Access node, but you might be able to accomplish the same thing with Landmark Transactions. We also had the flow build an index flat file that includes meta data associated with the exported documents, and used a Sys Command to compress the exported files in an archive (.zip), but I don't believe you can run Sys Commands in Multi Tenant.
If you are single tenant, for CSF, most binary / blob data is stored in tables with an "S$" prefix in the lm_csf schema. For example, PayableInvoiceDocument binary data is stored in the LMGHRDB.lm_csf.S$PIDOC table. What follows the "S$" prefix is usually the "prefix" value specified in the Business Class source, which is viewable in Rich Client using the LPL Viewer Library Widget.
For Multi Tenant you would need to use a Landmark Transaction instead of SQL, and reference the associated attachment property of the desired Business Class in the File Access Node.This property is usually something like FIELD.file, e.g. "Attachment.File".
Hope this helps!Andy
No problem. We don't use HCM / HR but do have a few required components in order for CSF to function, so I did a quick proof of concept to export all Employee Resource Picture Files with a Landmark transaction and it does function. I hard coded the file extension so you would still need to derive that based on MIME type unless there is filename property in the Business Class.
Landmark Transaction:_dataArea="lmghr" & _module="hcmfn" & _objectName="Employee" & _actionName="Find" & _actionOperator="NONE" & _actionType="MultipleRecordQuery" & _runAsUser="" & _authenticatedUser="" & _pageSize="30" & _filterString=ResourcePicture.File != blank & _relationName="" & _setName="" & _asOfDate="" & _effectiveDate="" & ResourcePicture.File & Employee
That Index Detail File Access Node is just appending lines to a delimited text file that will serve as an index of the files exported. You may want to to be able to tie meta data to the files you export, and this allows for that. Of course your use case will determine whether that's needed or not. If the meta data requirement is minimal you can just include that data in the filename of the exported files.The Sys Comand is to archive the exported files into a .zip file. This is useful if the exported documents need to be transferred somewhere. I believe 7zip is installed on the Landmark server by default, and that is what we used.
Were you ever able to find a resolution to this? Attempting something similar currently and coming up empty handed.
Thanks!
Thank you Andy! We are MT so I will have to play with this a bit but this is very helpful to get me started.
Krystle, We have not found a solution to this. We are still looking for the .pdf file that was originally uploaded.
Andy, thank you for this post! We are ST so this solution would work for us. What is in the Index Detail File Access node? And, what are you using the SysCommand for?
Here's another method to consider: creating a derived field that renders the attachment or image in base64 encoding. That makes it easy to retrieve via Landmark web service calls, ISD, dbexport, etc. and then once you've downloaded them just base64 decode them.
We have created this user defined field on the Employee business class in HCM (extra indenting removed):
AriEmployeePhotoBase64 is a DerivedField type is Text return ResourcePicture.File in base64