none
Workflow form - current location / browse for location RRS feed

  • Question

  • How can you get the URL of the current list i.e. http://sitecollection/site/library

    2.     How can you make a form field allow Browsing for a location within the current site / site collection.

     

    Purpose is for a custom Document convertor, want to know the current location and set it as default. But also allow the option of browsing for a specific location where you want the conversion to go.

     

    Many Thanks

     

    Marcus

    • Edited by mpjtaylor Wednesday, May 27, 2009 8:58 AM
    • Moved by Mike Walsh FIN Wednesday, May 27, 2009 9:28 AM wf q (From:SharePoint - Development and Programming)
    Wednesday, May 27, 2009 8:52 AM

Answers

  • Hi,

    If it's regarding a workflow, you might want to post in the workflow forums.

    Outside workflows, you can usually know the current list url like this :

    SPContext.Current.List.RootFolder.Url

    From a workflow, it could be via :

     

    workflowProperties.List.RootFolder.Url

    From an aspx form or infopath form, you should normally have the listid passed as parameter in the URL, with that, you only need to do

    SPContext.Current.Web.Lists[new Guid("guid from url")].RootFolder.Url;

    Best Regards


    SharePoint Content Rating & more free stuff - http://sptoolbasket.codeplex.com

     

    Wednesday, May 27, 2009 9:12 AM

All replies

  • Hi,

    If it's regarding a workflow, you might want to post in the workflow forums.

    Outside workflows, you can usually know the current list url like this :

    SPContext.Current.List.RootFolder.Url

    From a workflow, it could be via :

     

    workflowProperties.List.RootFolder.Url

    From an aspx form or infopath form, you should normally have the listid passed as parameter in the URL, with that, you only need to do

    SPContext.Current.Web.Lists[new Guid("guid from url")].RootFolder.Url;

    Best Regards


    SharePoint Content Rating & more free stuff - http://sptoolbasket.codeplex.com

     

    Wednesday, May 27, 2009 9:12 AM
  • >If it's regarding a workflow, you might want to post in the workflow forums. 

    Yes, indeed.

    Moving it to the workflow forum.


    Later: Marcus - NEVER post the same question to two forums. I have deleted the duplicate that was sent to InfoPath Forms Services.

    WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
    Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
    Wednesday, May 27, 2009 9:28 AM