Monday, November 16, 2009

SharePoint Document Property Names

Recently while working on embedding SharePoint properties within a Word 2003 document I discovered some oddities with the names. When working to embed a property named Doc No. I found at times one of the 3 following situations displayed in the Field list:
  1. Doc No.
  2. Doc No. and Document No.
  3. Document No.
If i used Doc No. the value would be incorrect. If I used Document No. the correct value would display and would synchronize.

Upon investigation I looked at the AllLists table in the database to find the row for the Document Library I was using. Examining the ContentType column explained the behaviour. For the field Doc No. this is the value I found:

DisplayName="Doc No."
Required="TRUE" Hidden="FALSE"
ReadOnly="FALSE" PITarget="" PrimaryPITarget=""
PIAttribute="" PrimaryPIAttribute=""
Aggregation="" Node=""/>


Notice that the name is Document No. (after decoding) and the DisplayName is Doc No. After seeing this, I remembered initially naming the column Document No. and then shortening it to Doc No. SharePoint obviously retained the original name as the ID of the field and just adds the DisplayName attribute to show the changed value. This is definitely a gotcha and will lead to some confusion for users. But at least the behaviour is now explained.

Thursday, November 5, 2009

Moving From September to October in BPC

Moving to October causes some trouble because we are moving from a 1 digit period (Jan = 1, Sep = 9) to a 2 digit period (Oct = 10). This causes problems during the Convert Task in SSIS. The actuals to transform text file contains all the correct data, the actuals to load text file contains only a header. The transformation fails.

To resolve this problem a change to the transformation file needs to occur. Follow these steps to make the change:
  1. eData > Manage Transformation File
  2. Select the file, in our case Actual CMS.xls
  3. Under the *MAPPING section find TIME=*COL(4) + *STR(.) + *COL(5) or TIME=*COL(4) + *STR(.0) + *COL(5)
  4. For 1 digit periods change *STR(.) to *STR(.0)
  5. For 2 digit periods change *STR(.0) TO *STR(.)
  6. Click on Validate and save transformation definitions in the Action Pane on the right.
  7. When prompted to Save, just select the same file, so in our case Actual CMS.xls.
  8. Click Yet to replace the existing file.
  9. Close the Transformation file