Metadata Fields not filled

Nov 6, 2012 at 12:51 PM

Hi Ray,

you know I got it to work months ago nto upload complete folder structures. Now at our production system it won't work the script does not set any managed metadata field with the foldernames.

I have created a term set for the column and the term set is opened. At a Document library I have created a column assotiated with the managed metadata term set. I can fill in metadata with the browser. It's a single field.

Now I want to upload a local folder structure to that library without the folders. The foldernames have to be uploaded as terms.

For every file I see:

Uploading Konformitätserklärung_SHZ_d.doc to qmsysalt/Konformitätserklärung_SHZ_
d.doc
        Folder Metadata: \Konformitätserklärungen\
        Loading configuration for field:Title type:Text
        Loading configuration for field:Pfad type:TaxonomyFieldType
Exception: Setting Pfad to Konformitätserklärungen
        Loading configuration for field:Created type:DateTime
                Setting DateTime:Created == 01/16/2003 10:37:54
        Loading configuration for field:Author type:User
        Loading configuration for field:Modified type:DateTime
                Setting DateTime:Modified == 01/16/2003 10:37:54
        Loading configuration for field:Editor type:User

BTW: My Sharpoint site is german.

Do you have an idea why that doesn't work anymore? Also Folders seem to be downloaded as files, when I tell the script to download folders.

Regards, Thomas

Nov 6, 2012 at 1:00 PM

I have created an issue for that.

Coordinator
Nov 7, 2012 at 1:15 AM

Hi Thomas.

I'm at home and a little incapacitated after a sporting accident... just got out of hospital... also a little high on painkillers.

I don't have an environment where I can test, but from the exception msg it appears the script can't or didn't add the Term, and so can use/set it. Did you ensure the field is open so terms can be added?
I never tested it with different languages, but Terms sets can be in different languages so you'll need to debug and verify the script is adding the term in correctly and then verify it's selecting the term.

Debugging is pretty easy, just remove the try{} catch{} starting line 465... it will fall over and you can either pause it can check variable values before it falls over or fix the reason it fell over.

I can help in a couple of weeks when I'm better, but I'll need to replicate your environment.

Regards, Ray.

Jan 2, 2013 at 1:27 PM

Hey Ray,

how are you doing?

I did dome debugging but removing try / catch didn't help much. I now figured out the the exception is at the following line:

$oSingleTermObj = spGetSetTerm $oWeb.Site.Url $oSPField $termValue $configField $oSPField.AnchorId

So I did dome logging:

logIt $log ($oWeb.Site.Url) Red
          logIt $log ($oSPField) Red
          logIt $log ($termValue) Red
          logIt $log ($configField) Red
          logIt $log ($oSPField.AnchorId) Red
          logIt $log ($oterm) Red
          spGetSetTerm $oWeb.Site.Url $oSPField $termValue $configField $oSPField.AnchorId
          $oSingleTermObj = spGetSetTerm $oWeb.Site.Url $oSPField $termValue $configField $oSPField.AnchorId
          logIt $log ("Wurst3") Red
          $oSPField.SetFieldValue($oSPitem, $oSingleTermObj);

And it shows:

Uploading hotcontrol_cDT_ConformityDecl_201109_EN.pdf to qmsysalt/Konformitätser
klärungen/Konformitätserklärungen-hotcontrol_cDT_ConformityDecl_201109_EN.pdf
        Loading file metadata from Web Service http://site.hotset.lan/qw
                Web Service returned no data for Dokumente/Konformitätserklärung
en/hotcontrol_cDT_ConformityDecl_201109_EN.pdf
        Folder Metadata: \Konformitätserklärungen\
        Loading configuration for field:Title type:Text
        Loading configuration for field:Pfad type:TaxonomyFieldType
Wurst1
http://site.hotset.lan/qw
Pfad
Konformitätserklärungen
System.Xml.XmlElement
00000000-0000-0000-0000-000000000000

Exception: Setting Pfad to Konformitätserklärungen
        Loading configuration for field:Created type:DateTime
                Setting DateTime:Created == 09/28/2011 11:03:23
        Loading configuration for field:Author type:User
        Loading configuration for field:Modified type:DateTime
                Setting DateTime:Modified == 09/28/2011 11:03:23
        Loading configuration for field:Editor type:User

 

My thought is that something in spGetSetTerm is going wrong.

Do you have any ideas?

Regards, Thomas

Mar 22, 2013 at 12:39 PM
It's solved, see issues ...