Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm running SharePoint Foundation and copying a site template per project. I would like to filter the BCS list in my template using the site name.

Is there a possible method?

share|improve this question
add comment

1 Answer

Yeah there is, I'm actually filtering BCS lists based upon a property in the site's propertybag, but you can really use any variable you want.

What you basically want to do is use the .NET class option for BCS. Instead of getting results directly out of SQL Server, get them via a .NET class. In the methods used, you can use your SPContext to figure out which site called the method and provide extra filtering instead. I have a brief description up on my blog here: http://blog.repsaj.nl/?p=170, sorry there's no copy/paste code snippets, I can't share that code because it's rights protected. But with some tutorials on using .NET classes for BCS, you'll get there I'm sure.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.