views:

303

answers:

2

We are developing a document management solution with Sharepoint 2007 and I'm having some issues figuring out a couple items with the structure. The documents are templates that are used to merge data into letters sent to clients. While the templates will be managed in Sharepoint, the actual letters that will be generated will be handled through a web application. The rules to which template is to be pulled up would be "assigned" through Sharepoint via Meta-Data. This data would be sent over to the other system (which would keep track of the rules and an identifier to the raw template). A web service would be created on the SP side so the front end application would simply call it to pull up the template (once it was determined which one to use).

Okay that said the real question is how to deal with the rules? I originally thought meta-data and write the data out (via web service call) to the web application db. For example when saving the document have a meta data field for Template Type (for this custom contenttype). First problem how to populate a drop down available for sharepoint to load a list of templatetypes? Can I drive this from a database or do I have to use a static xml list.

A: 

I may be greatly oversimplifying your requirements here, so take this with a grain of salt.

If all of this information is stored as columns in the document library, you wouldn't necessarily have to create your own web service. SharePoint has web services for retrieving data from lists (see this MSDN reference).

In this case, the rules would be handled on the client side rather than in SharePoint, but would use metadata stored in SharePoint. The client could build a CAML query to select the most applicable template. (If you don't know CAML, downloading the U2U CAML Query Builder is a good place to start.)

Also:

First problem how to populate a drop down available for sharepoint to load a list of templatetypes? Can I drive this from a database or do I have to use a static xml list.

If you need to provide drop-down lists for different metadata fields in the document library, I'd consider making them lookup columns. That way, the client application could download the list of options for each column through the web service, so you wouldn't have to maintain a list of options elsewhere.

DylanW
+2  A: 

Aaak. You can create a field based on a lookup of information on the BDC. You can also create a lookup based on a list in SharePoint.

Nat