Project Site - Get Project Name For Customization
-
lunedì 13 agosto 2012 17:52
Hello,
I have the following dilemma: we have an enterprise template that each new project site is created from. I want to customize the template by inserting a Report Viewer web part which will display a project related report. This report takes a paramter - project name. I was thinking about using a Query String filter to pass the project name into the report viewer, but neither does that parameter exist in the querystring, nor it is an optimal solution, even if I was able to append that parameter to the URL somehow, because then I'd have to worry about every single link that leads to the project's home page.
I also looked at using Page Field Filter web part, but I don't understand where it gets the columns in the drop-down from. I tried editing a project site page directly, added the Page Field Filter web part, but the drop-down was disabled altogeter. No idea why.
So, bottom line, I need to somehow get the project name dynamically, based on the site, and pass that into the Report Viewer. Hopefully, without VS add-ons. ASP hidden field? Javascript maybe? I haven't done much of JS customization with SharePoint.
Any leads would be appreciated!
Thanks,
Ilya
Tutte le risposte
-
martedì 14 agosto 2012 09:55Moderatore
-
giovedì 16 agosto 2012 06:38Hi,
For me also interesting with how to get project site name, especially with SPD workflow (without Visual Studio code)Alexey
-
giovedì 16 agosto 2012 16:55
Alexey,
With SPD workflow it's much easier. You can get the site name from WorkflowContext: CurrentSiteUrl by using the string manipulation functions available to you and extracting the site name from the URL string and storing it in a local variable.
Ilya
EDIT: when you add a workflow action, your string functions are under "Utility Actions".- Modificato Rockmus giovedì 16 agosto 2012 16:57
- Contrassegnato come risposta Entan MingMicrosoft Contingent Staff, Moderator venerdì 7 settembre 2012 11:38
-
venerdì 17 agosto 2012 07:46
Hi Ilya,
Thanx, you are right. I am already found another little harder solution :)
But this was much more easy which i expected. Thanks again.
Alexey
- Contrassegnato come risposta Entan MingMicrosoft Contingent Staff, Moderator venerdì 7 settembre 2012 11:37
-
venerdì 17 agosto 2012 17:33I'm glad I could help! :)

