Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

OVERVIEW

The 'Default Attached Files Folder' functionality can be used to 'Dump' files in a specified folder structure (as determined by the 'Default Attached Files Folder' control parameter) to be automatically attached to the matching record in Workbench.

SETUP

A Control Parameter called 'Default Attached Files Folder' must be configured. This is the Source location of filed to be attached, not to be confused with the 'File Store Location' which is the destination location. These two folders should be kept separate from on another, that can be located on the same drive (Recommended), but do not put one inside the other.

Once the 'Default Attached Files Folder' control parameter has been set to a valid path (and the 'File Store Location') , open Workbench and click the Paperclip icon on the menu bar.

 

Then close the 'Edit View File Attachments' Screen, opening this screen will trigger the Automated filing and create the necessary folder structure in the 'Default Attached Files Folder'.

Files must be placed in the correct subfolder within this structure. For Example files to be attached to a Purchase Order must be placed in the 'PurchaseOrder' folder within the 'Default Attached Files Folder' .

File Name Rules

Files placed in this structure will need to conform to the following naming conventions for the files to be attached to the correct record in Workbench.

'RelatedRecordID;Attached File Group Name;Description.xxx'

So for example if the destination Record Type is a Purchase Order and you’re attaching a .pdf file, the file name format would be:

'PONumber;Attached File Group Name;Description.pdf'

i.e: 1234;Scanned PO;PO 1234.pdf

Note that the Attached File Group Name and Description are optional so the following would also work:

1234.pdf

1234;;PO 1234.pdf

1234;Scanned PO.pdf

In addition, if the group name is invalid, the file will still be processed but without a group assigned.

File Name Rules for More Complex Related Record Types

 

What RelatedRecordID is used for my file type?

The RelatedRecordID for each Related Record Type is Usually the PrimaryKey (ID field) of the RelatedRecord Table.

The list below shows the defaults (No Config.ini file) but can be overridden with the implementation of a Config.ini if required (More on this later in the Config.ini section).

This is a comprehensive list (at time of publishing):

Record Type RelatedRecordID format Table Validated Against
Action ActionID Actions
APCredit APInvoiceID APInvoices
APInvoice APInvoiceID APInvoices
APVoucher VoucherID APVoucher
ARCredit InvoiceNumber JobInvoices
ARInvoice InvoiceNumber JobInvoices
Asset AssetID Assets
Batch BatchNo BatchHeaders
CashFlow JobCode.YearNo.PeriodNo Forecasts
Company CompanyID Companies 
Contract ContractCode Contracts
Drawing DocID Documents
Estimate EstimateID Estimates
Forecast JobCode.YearNo.PeriodNo Forecasts
ForecastGainAndLoss WIPAdjustmentID WIPAdjustments
ForecastRiskAdjustment ForecastRiskID ForecastRisk
ForecastSubcontractRisk ForecastRiskID ForecastRisk
ForecastUncommittedAdjustment ForecastRiskID ForecastRisk
ForecastWIPAdjustment WIPAdjustmentID WIPAdjustments
Item ItemID Items
Job    
JobTransaction    
Meeting    
MeetingItem    
Person    
Plant    
PlantPolicy    
PlantServiceOrder    
PriceRequest    
Prospect    
PurchaseOrder PONumber PurchaseOrders
Quote    
ReturnVoucher    
ServiceAgreement    
ServiceDesk    
SubContract    
SubContractorCetrtificationDetail    
Timesheet PersonID.TimesheetDate Timesheets
WorksOrder PONumber PurchaseOrders

 Timesheet's RelatedRecordID has a Timesheet component, these need to be treated in the following way:

Format: yyyym(m)d(d)

As file names cannot contain slashes these have been removed. The year component is always 4 digits. The Month and Day component are variable length (One or two characters) as leading zeros are removed.

So a file being attached to PersonID 1234 for Week Ending 13/07/2012 would have a RelatedRecordID portion of the file name as:

1234.2012713

Rejected Files

Rejected files are files that could not be automatically attached for some reason.

Common causes are:

  • Files placed in the wrong subfolder.
  • Files that failed validation of the RelatedRecordID.
  • Files that have substituted the RelatedRecordID with another field, and that field is not unique for the value being looked up (More on this later in the Config.ini section).

These files are placed in a folder structure within the 'Default Attached Files Folder'. A 'Not Processed' folder is created when required, and the rejected file is placed in a subfolder (Matching its Related Record Type).

Note that in the event a file of the same name already exists in the 'Not Processed' folder structure the newly rejected file is renamed with a number in brackets i.e. 1234;Scanned PO;PO 1234(1).pdf

 These files will need to be manually attended to.

Config.ini

The Config.ini file is optional. If you are attaching files to record types in the standard manner and the file name's first 'field' the area of the file name before the first ; (semicolin) is the normal RelatedRecordID for that file type, then you wont need a Config.ini file.

The Config.ini is a TAB delimited file. However Commas cannot be used in this file, substituted for a pipe ( | ) character if required.

A reasonable knowledge of SQL is required to configure the Config.ini file correctly.

The Config.ini file is used to interpret another 'Unique' field on the related record type's table and resolve to the normal RelatedRecordID. For example when attaching files to a Person (People table) record the normal RelatedRecordID is PersonID, however you could use the Config.ini file to allow the PersonID in the file name to be replaced with another unique field from the People table such as Employee Number instead.

To do this example above a line in the Config.ini file would need to look like the following:

Person SELECT People.PersonID FROM People WHERE People.EmployeeNo = '{1}'

To use Employee Number on timesheets instead of PersonID as well, add the following line to the Config.ini file:

Timesheet SELECT People.PersonID FROM People WHERE People.EmployeeNo = '{1}' Null

The Config.ini file must be placed in the 'Default Attached Files Folder' if required.

 

  • No labels