Behind Enemy Lines: Document Information Panel Editing in InfoPath

by andrew

[migrated from http://edgedev.blogspot.com]:

This one really had me wrapped around the axle for a bit, and ye ol’ trusty google let me down. Not a single applicable hit when I searched on [“form definition” “for dataObject”] so when I figured it out quite by accident I thought I’d contribute to the googlesphere and maybe help someone else out who might run into this. If anyone does. Ever. Ok, maybe no one else will ever have this happen to them, but it happened to me I promise.

I thought I’d go and customize the Document Information Panel for a Content Type – totally harmless right? Well, InfoPath didn’t seem to think so. And when I tried to attach to the Content Type’s schema as the basis for a new form (or when I tried to customize it straight from the link in the Content Type settings) i got this:

InfoPath cannot open the following form: C:Users[Name]AppDataLocalMicrosoftWindowsTemporary Internet FilesContent.MSO19D946AE.tmpcustomXsn.xsn
The XML schema file specified in the form definition (.xsf) file for dataObject “list_fb2ad403-eb57-43f2-8bee-e7574092cd4d” cannot be used.

Lovely. How informative and useful. It’s obvious from that error what exactly needs fixing. Ok, not really. At first I was at a total loss and decided to go home for the weekend. When I got back I realized that “list_” looked a lot like a list GUID. Since I was in a fairly new dev environment without too much clutter yet, I scanned through my lists and found a match on a list used as the source for 2 of the Look-Up Site Columns in the Content Type for which I was trying to customize the Doc Info Panel. Aha!

Removing both Site Columns from the Content Type and trying again, I was able to launch the schema for the form. Grrr… Hmmm…

So, was there anything weird about those columns? Well, they were look-up columns on a list with the multi-select and unlimited length in documents options checked. But what if I added them back to the content type and tried again?

Adding the first one back and trying again it worked! Alright. Adding the second one … NOPE! Crash and burn. What gives? Well, this must obviously be another stupid Microsoft bug. Incidentally, both look-up columns are based on the same column of the same list. I have a “From” and a “To” column that point to the “Display Name” column a master Names List. But I won’t be able to do both and still customize the Doc Info Panel. Bummer. Unless I can come up with some sort of work around (unlikely). But I’ll update this if I do.

[a few hours later]

Alrighty then. The enemy can be tricked. If you HAVE to be able to do this (like I do) here’s what you do:

  1. change one of the site Columns to point at a different look-up list column than the other one
  2. this will let you open the doc info panel successfully even with both site columns pointing at the same look-up list (albeit at 2 different columns within that list)
  3. in the field properties in infopath, open up the control populated from this look-up list column and change it back to the column you want to pull in
  4. in the Site Column change it back to point at the the right look-up column as well.

Voila! Happy ending. If I hadn’t wasted hours on something that should work anyway.


4 Responses to “Behind Enemy Lines: Document Information Panel Editing in InfoPath”

  • tommyboy Says:

    You are a life-saver…saved me a ton of time…thanks so much for posting!

    Here’s what I tried, as it’s another solution, assuming you need to re-create the template from scratch again, might be a better option, but using much of your findings to accomplish this:

    1. update the list you’re having an issue with (aka, the one you’re referring to from the site Column) to contain a new column that’s a calculated column to reference the column you need to refer to twice. (whew…hopefully that makes sense! 😉

    2. change one of the two site Columns to point at the new look-up list column.

    3. repeat as needed for additional columns needing to point to the same list/column.

    (see any flaws in this thought, practice? seemed to work for me so far)

    thanks,
    tom

  • edgelore Says:

    Thanks, Tom. Glad it helped… honestly I’m not in the right frame of mind to even make sense of my own original post at the moment 🙂 But what you suggest sounds good too. The only question in the back of my mind is remembering that Calculated Columns can’t point to Look-up Columns. But maybe I misunderstood where you were headed with that (sorry!). Anyway, if yours is working the way you need it to GREAT! Take care.

  • M Salah Says:

    thanks a lot for useful information.
    but I have another issue when I create new document in sharepoint every thing going well, the problem when reopen this document for editing the lookup field (dropdownlist) in document properties contains no items unless the chosen 1st time, Icant change it.
    the only solution to change it is to open document properties & change it there, which give me ID values in the document not title field.
    any solution please

  • andrew Says:

    You’re welcome! Sorry I can’t be more helpful on your specific issue – It has been a long time since I’ve looked at that scenario, and I don’t really have a way to reproduce your issue at the moment. If you’re using a data source in InfoPath to look-up and fill that field it sounds like the Document Info Panel is not retrieving / refreshing those values on subsequent opens. I hope you figure it out! I know those little details can be a pain some times.

Leave a Reply