green thumb
“i planted the gun in the dirt”
[intrigued father]:
“oh? is it going to grow into a gun tree?”
[the Z who has it all figured out]:
“when we water it – it will.”
“i planted the gun in the dirt”
[intrigued father]:
“oh? is it going to grow into a gun tree?”
[the Z who has it all figured out]:
“when we water it – it will.”
8 weeks and counting…
Only a short time left before we hit the road! We are selling stuff, donating stuff, throwing away stuff. Makes me realize how much stuff I really have. Makes me wonder why I have so much stuff anyway. I’m looking forward to living in a smaller space. There will be a lot less to clean. Less space to accumulate stuff. I’m trying to organize and simplify, but for some reason, this means buying more. I need new bins and new containers and drawers and folders to keep everything in it’s place. I am buying more stuff as I’m trying to get rid of stuff. It’s getting very complicated to live simply. It would be easier to throw everything out and start over completely. Hmmmmm…. that’s an idea.
[reaching for pretend popcorn]:
“i’m watching a show. it’s a long one. first there’s Curious George, and then there’s George Washington…”
[wise and understanding father]:
“Oh, George Washington? What’s that about?”
[matter of factly]:
“robots.”
“atchaforcanu!”
[translation finally achieved through the tireless efforts of several frustrated linguists]:
“watch how far i can yell!”
[migrated from http://edgedev.blogspot.com]:
It seemed simple enough at first. All I wanted was a way to dynamically pull data from Lists and Document Libaries into InfoPath. Oh, but did I forget to mentioned that I also wanted the data filtered BEFORE it hit InfoPath because the Lists and Libraries might be massive (go figure). Trying several things, it became obvious that I needed a faster/better/easier method than any of the following:
Looking for a solution, I stumbled on this article – http://blogs.msdn.com/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx – at the InfoPath Team blog which formed the basis for a new idea:
To summarize – if you don’t want to have to read through the whole article yourself: This little known feature allows you to pass GUIDs for Lists and Views, along with filter parameters, in the URL querystring to owssvr.dll and dynamically retrieve an XML “results” file. Furthermore, the URL itself can be used as the file location for an “XML Document” data connection in InfoPath.
The main hurdle is that, once the data connection is created, it doesn’t seem on the surface like there’s a way to dynamically update this file location to retrieve a different XML Results Document from a List or Library based on related fields in a form that has been opened. Well, it turns out that the InfoPath object model exposes this property and lets us manually execute the query.
In my particular scenario I wanted to retrieve a group of documents (metadata) from a massive Document Library where a DocumentColumn matched a particular FieldValue in the form opened. Here’s what I did:
// we need to instantiate a typed data connection object
// to modify the query and execute the results
FileQueryConnection dc = (FileQueryConnection)(this.DataConnections
[“NameOfXmlDataConnectionCreatedThroughWizard”]);
// next, we append the filtering values from the form field(s)
// to the existing URL already stored in the data connection
// –see notes for description of readNode()
dc.FileLocation += “&FilterField1=DocumentColumnName&FilterValue1=” +
readNode(“/my:myFields/my:FieldInForm”);
//finally, we execute the data connection to return the results
dc.Execute();
Notes:
Use this knowledge wisely. And have fun.
[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:
Voila! Happy ending. If I hadn’t wasted hours on something that should work anyway.