Save column in list definition for feature

Jun 8, 2009 at 7:45 PM

I have successfully installed this package in my development environment.  I created a simple list with two columns: the title and one of type FilteredLookup.  It works very well.

Using "SharePoint Solution Generator 2008" I saved this list as a list definition.  However, when I try to create a list definition feature using VSeWSS 1.3, it does not work because it complains about the <Customization> node not being a valid child node of <Field> in schema.xml.

How can I create a list definition taking advantage of the FilteredLookup field?


Jun 8, 2009 at 8:16 PM

I take back everything I said.  It works fine when I create a simple list, i need to figure out what I was doing wrong with the bigger list.

To be more specific:  I created a list including one column of type FilteredLookup as described above. I saved the list definition using the solution generator, and built the generated solution and deployed to my dev environment.  (After changing the values of "List" and "ShowField" attributes of the appropriate Field node at List/MetaData/Fields).  I was then able to create a list based on that list definition. 

Jun 8, 2009 at 8:33 PM

OK, so i was a little early.  It's definitely NOT working.  It worked before, I think, b/c I didn't change the guids and they pointed at previously existing lists. 

Now, when I create a list, then go to the settings, and select the filtered lookup column, it has selected the current site, the "Announcements" list ( I assume b/c it is first alphabetically) and the "Content Type" column (again, first), ignoring my settings.  However, it does honor my "Apply Query Filter" setting, CAML query, and "Allow multiple values" setting.

Jun 8, 2009 at 9:08 PM

OK, I figured it out.  The code assumes GUIDS will be present.  I edited the code to assume text and changed it to lookup the guids.  I will post later, but in case I don't, and you have the same problem, you'll need to edit the GetAvailableValues method (beginning line 27) in Util.cs.