BrianFinch

Hi,

I'm trying to create a list feature with contained lookup fields.

There is a great article about adding custom lists at:

http://heathersolomon.com/blog/articles/1300.aspx

and as the author states, a script is needed to read the GUID of a target list when a field element is of type lookup.

As my knowledge about scripting is less than poor, is anybody out there who knows how this could be established within a script

Thank you very much,

Brian



Re: SharePoint - Development and Programming script to read the GUID of the target list

Curtis Ruppe (MicroStaff IT)

Go to the target List, and click on Settings -> List Settings. The URL now has the List guid in it. If you have MOSS 2007 installed, you can even click on Audience Target Settings (within List Settings) to get the List GUID in the format they want it. If you have WSS 3.0, you should be able to view source to find the List GUID in the HTML as well. Just remember whenever you have a % sign in your GUID, yo uneed to convert something to either a {, a -, or a } (in that order.



Re: SharePoint - Development and Programming script to read the GUID of the target list

BrianFinch

Hello Curtis,

Thank you very much for your reply.

Sorry that I was not specific enough in my post - I would need a script that would read the GUID at the time of deployment (as I would roll out the list as a feature which is dependend on another list (sorry, didn't state that)). I found a wealthy resource which also answers the question of lookups in other lists (i'm still in the state of evaluating and trying) at sharepointnutsandbolts.blogspot.com. There are several blogs dealing with several issues needed for writing features.

Thanks again,

Brian





Re: SharePoint - Development and Programming script to read the GUID of the target list

Curtis Ruppe (MicroStaff IT)

Yeah, a FeatureReceiver is the way to go with on the fly list definition deployment. You would need to come up with some rollback options in case the lists were not available, though.