Respondido How to set a global variable in SharePoint 2010?

  • 2012年4月13日 8:41
     
     

    Hi guys, I have a use case like this in a SharePoint portal:

    1. On the initial page, I have a WebPart with a list of projects (custom data type).
    2. The user should be able to select one project via a data field in each project in the list. I'm thinking of a field with a Link/Image to initiate a workflow.
    3. This workflow should set a global variable with the specific project ID. Is it still possible with multiple users?
    4. Based on the ID stored in this variable, various sites should set filters in some webparts (Lists of project tasks, meetings, etc.)
    5. The variable should be set until the user selects another project on the initial page.

    Is it possible that way and do you have any recommendations how to do so? Any alternatives?

    Thank you very much in advance for your assistance! Marc

すべての返信

  • 2012年4月13日 8:54
     
     回答済み

    Hi Marc,

    You can make use of "Property Bag" or web.config file for storing the global values.

    Here are some useful links

    http://pbs2010.codeplex.com/

    http://www.wictorwilen.se/Post/Six-ways-to-store-settings-in-SharePoint.aspx

    Regards


    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful. It'll help other users who are visiting your thread for the similar problem.

  • 2012年4月16日 11:34
     
     

    Hello Arun,I'll try the solutions you've suggested right now.

    I'll keep you posted! Thx a lot!!!

  • 2012年4月23日 13:03
     
     

    Hey guys,

    I'm still working on that problem and haven't been succesful so far.

    Another idea came to my mind: I've created a User Property in the Central Administration to store the project reference mentioned above. A hyperlink in the project content type will be used to initiate a Workflow to set the User Property. My question now is:

    How can I use the new user property in a workflow? I checked Google, Bing and friends but the search wasn't succesful...

    EDIT: Discovered the Workflow Action "Set Workflow Variable". By selecting User Profile, I got access to some of the profile properties. However, the new property added is not listed...

    Thx in advance!!!


    • 編集済み MarcJe 2012年4月23日 13:34
    •