Using Designer to get Document ID in Document Library

I am creating an approval workflow on a document library that auto starts on submitting a document.
What I want to do, besides sending the user a link to view the document, is to actually provide a link to the URL that is used to generated the popup with approval options. I do not need a popup.  When you paste the URL popup in the address bar, you
get the page with the correct info.
Here's the URL:
http://.../_Layouts/listform.aspx?PageType=4&ListId={...}&ID=22
The number 22 is what I am trying to get.
In Designer, when i do a look up, I cannot seem to get the ID of the document in the list view.

Hi Ogrehulk,
Is the URL the related document in the approval task?
Do you want to put the URL in the email when user gets the task notification? 
If yes, we can get the ID of the related document in the Start Approval Process step.
Click Approval in the Start Approval Process step.
Click Change the behavior of a single task under Customization.
Navigate to the step Email task notification to Current Task:Assigned To in When a Task is Pending.
Click Current Task:Assigned To.
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • I'm trying to read some XML data from temperature logger over my network. I'm using LabView version 2009 sp1. I'm using the URL Get Document Vi. It works fine when using Internet sites like google or foxnews etc...

    I'm trying to read some XML data from temperature logger over my network.  I'm using LabView version 2009 sp1.  I'm using the URL Get Document Vi.  It works fine when using Internet sites like google or foxnews etc...
    When I use it with my temperature logger most of the time I get an Error 66...but some times it does work and actually retrieves the document. 
    I can use the same address "http://172.22.21.68/XMLfeed.rb" (Internet Explorer or Google Chrome) in my browser and get a response every time.  When accessing from my browser the server in the temperature logger does take around 6 seconds to respond, but it does respond every time. 
    Is the URL Get Document Vi exceeding a timeout?  If so, where can I set it to wait longer?
    Attachments:
    Error 66.jpg ‏183 KB

    It looks like the TCP Buffered Read has a 2.5 sec timeout, I believe that is where I had trouble as well.  Try creating your own URL Get HTTP Doc vi in which you call URL Get Document in normal mode, with an appropriate number of characters to fetch (enough characters so that you capture all the important data in the XML file).
    Attachments:
    ex1.PNG ‏33 KB

  • How to add the current user to a people picker using javascript coding in document library

    Hi Everyone,
    This is my scenario,
    I have a document library,for this if any user uploads a document,there we have three content types(Ex:content1,content2,content3)
    if the uploaded user is from content 1(here we have four columns name,assigned to ,status,published to) after uploading the document the document has to be updated.so when the document is updated by the user then automatically the published filed people
    picker has to be filled up with the current user name this is done by using java script object model programming.
    i am stuck with this can anyone help me..............
    thanks in advance
    Ramu

    Hi,
    I understand that you want to set a people picker field value automatically to current user. You can use these ECMA scripts on your EditForm.aspx page. Edit the page in SharePoint designer and add the code before a </asp:Content> tag.
     <script type="text/javascript">
    var context = null;
     var web = null;
     var currentUser = null;
    ExecuteOrDelayUntilScriptLoaded(GetUserLoginName, "sp.js");
    function GetUserLoginName() {
    context = new SP.ClientContext.get_current();
     web = context.get_web();
     this._currentUser = web.get_currentUser();
     context.load(this._currentUser);
     context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod),
    Function.createDelegate(this, this.onFailureMethod));
     function onSuccessMethod(sender, args) {
     var today = new Date();
     alert('Name:' + this._currentUser.get_title() + '\n Login:' + this._currentUser.get_loginName()); document.getElementById('ctl00_m_g_9b4b3950_80d8_4e6e_b2fa_241b727d83d4_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').innerHTML=this._currentUser.get_title();//you
    need to change the ID here to you people picker field ID. You can get the id for this field with the help of IE developer tool.
     function onFaiureMethod(sender, args) {
     alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     </script>
    For more information, please refer to this site:
    Get current user’s LoginName Ecmascript Sharepoint 2010:
    http://www.learningsharepoint.com/2011/05/18/get-current-users-loginname-ecmascript-sharepoint-2010/
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • How to get document library column data through Programmatically

    HI,
    I have one scenario..here i have to get the particular document library column data...Like fetching List data.
    In LIST We will do LIke this:
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                using (SPWeb web = site.OpenWeb())
                    SPList list = web.Lists["ListName"];
                    SPListItem item = list.Items.Add();              
                    item["Title"] = txtTitle.Text;
    item.update()
       But here we want to fetch  data from document library column data....
    I did following way....can any one suggest me....
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                using (SPWeb web = site.OpenWeb())
                    SPDocumentLibrary documentLib = web.Lists["DocumentName"] as SPDocumentLibrary;
                    SPListItem items = documentLib.Items.Add();
    Thanks.....

    Hi,
    The code that you have posted is adding data to the list or document library. Do you want to add or fetch data from or to document library?
    You can refer following link for Inserting/Updating documents in document library:
    http://blogs.perficient.com/microsoft/2009/04/working-with-documents-stored-in-sharepoint-document-library-programmatically/
    For fetching data from document library, you can use following code:
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    string documentLibName = "Doc_Lib_Name";
    SPFolder docLibrary = web.GetFolder(documentLibName);
    foreach (SPFile file in docLibrary.Files)
    var customColValue = file.Item["Custom_Column_Name"];
    Hope this helps!
    Regards, Shruti

  • How to deploy file using module in existing document library ?

    Hello,
    I have picture library where I want to upload image using module
    Location is "asset-library/PublishingImages/Images"
    PublishingImages - Picture Library
    Images - Folder name under PublishingImages picture library
    I have added via module as below :
    <!-- Image Files Start -->
    <Module Name="WebFiles" Url="/asset-library/PublishingImages/Images" Path="WebFiles\Images" >
    <File Path="newContent.jpg" Url="newContent.jpg" Type="GhostableInLibrary" />
    </Module>
    <!-- Image Files End -->
    However when I activate the feature , it throws below error
    The URL '/asset-library/PublishingImages/Images' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
    while URL is correct - would you please suggest where I am wrong ?
    Thanks and Regards,
    Dipti Chhatrapati

    Hi Dipti,
    You simply need the URL attribute of the module as 
    Url="/PublishingImages/Images"
    I am assuming asset-library is your sub site name. and if so it would not be required in URL of module
    Cheers! Kapil Happy SharePointing PS: Please mark the reply as answer if it is what you are looking for.

  • How to timeout URL HTTP Get Document.vi

    I'm using URL HTTP Get Document.vi to read a file. But sometimes the other machine were is the url is down so the application freezes for a long time because is stucked in URL HTTP Get Document.vi
    How can I force that this Vi stops if cannot complete in some time?

    You would have to modify the VI to allow you to pass in a timeout value. The defult is 25 seconds. If you decide to modify the VI I recommend you make a copy of all of the HTTP VIs, place them in your user directory (or some other suitable place) and modify those VIs. Use those in place of the shipping VIs.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Issue trying to use a Sharepoint document library as a network drive on which a software can create and delete content

    Hi,
    With my colleagues we are using a dictation/transcription software which automatically creates files, moves them from folders to folders and deletes them. Until now, all this was done on a network drive, but the drive will soon be unavailable and
    we will eventually have to use a SharePoint document library instead, and I am currently testing this option.
    I have created a document library (with no versioning and no check out required) and I mapped it as a drive in Windows Explorer to link the SharePoint folders with the dictation software. Everything seems to work fine except
    for one thing: when the dictation software tries to move files from one folder to another, the files are pasted in the destination folder but not deleted from the original folder and an error message pops up saying "delete operation has failed".
    So the softaware is able to automatically create new content in the document library but is unable to automatically delete (I can however delete manually through the software interface).
    Any idea on what is causing this issue and how to solve it?
    Thank you

    Hi,
    According to your description, my understanding is that the documents cannot be deleted in the original folder when using the software with SharePoint library.
    I recommend to verify the things below:
    Which credential did you use to map the document library as network drive?
    If the credential was windows logon, then I recommend to check if the documents can be deleted in the network drive which was connected to SharePoint library directly.
    If the documents can be deleted in the network drive which was connected to SharePoint library, then the issue may be due to the compatibility problem between the software and WebDAV. Then you need to check the issue using third-party software provider.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Document Library Versioning

    First off...great forum, it's saved me numerous times in the past. Search didn't help me out this time around.
    I've been using the packaged app Document Library v0.92 on Apex 3.01.00.08. Recently I expanded usage of the doc lib to other users and noticed some strange behavior in the versioning functionality. Whenever a new version of an existing document is uploaded the user under "modified by" is overwritten for all previous versions. I cannot verify this ever worked. I downloaded the app again and reinstalled into a different schema with the same result. Anyone else notice this?
    Thanks
    Mike

    Thank you for the feedback. I'm going to look at this more myself but what I ended up doing was modifying the report sql on page 5 to select the user from the created_by column in doclib_documents instead of the modified_by column. The created_by column gets updated with the user name of the modifying user...essentially this is what should be happening to the modified_by column. Is the created_by column supposed to store the user name that originally uploaded the document and the modified_by column store the user name that added a new version? At this point I'm trying to understand the need for both columns... In my deployment I don't think I need to know who the originator of the document is if that's the intended use for the created_by column. Still playing with it but I'll probably have to modify page 1 and 9 as well. Seem like it should work.... Any holes in my logic here?
    Thanks again

  • How to grant anonymous access on sharepoint document library/list only not for web application

    Hello
    How to grant anonymous access on sharepoint document library/list only not for web application.I have claim based sharepoint site and has to be but i want to grant access on document library/list only.Is this possible?
    Thanks
    Rajesh Kumar "Changing the Face" can change nothing.But "Facing the Change" can change everything.

    As i am using following code
    SPSite site = SPContext.Current.Site;
                SPWeb web = SPContext.Current.Web;
                SPSecurity.RunWithElevatedPrivileges(delegate()
                    using (SPSite ospSite = new SPSite(site.ID))
                        using (SPWeb webs = ospSite.OpenWeb(web.ID))
                            // Enable anonymous access on web application
                            webs.AllowUnsafeUpdates = true;
                            SPUrlZone urlZone = SPUrlZone.Default;
                            SPWebApplication specifiedWebApplication = ospSite.WebApplication;
                            SPIisSettings iisSettings = specifiedWebApplication.IisSettings[urlZone];
                            //iisSettings.AuthenticationMode = AuthenticationMode.Windows;
                            iisSettings.AllowAnonymous = true;                       
                            specifiedWebApplication.Update();
                            // Get document library collection here and fetch all the document urls
                            SPDocumentLibrary docLib = (SPDocumentLibrary)web.Lists["Documents"];
                            if (docLib != null)
                                docLib.BreakRoleInheritance(true, false);
                                docLib.AllowEveryoneViewItems = true;
                                docLib.AnonymousPermMask64 = SPBasePermissions.ViewPages | SPBasePermissions.OpenItems | SPBasePermissions.ViewVersions
                                    | SPBasePermissions.Open | SPBasePermissions.UseClientIntegration | SPBasePermissions.ViewFormPages | SPBasePermissions.ViewListItems;
                                //docLib.AnonymousPermMask64 = SPBasePermissions.EmptyMask;
                                docLib.Update();
    Should working but getting access denied......i am totally stuck at this point.
    Rajesh Kumar "Changing the Face" can change nothing.But "Facing the Change" can change everything.

  • Managing threshold value of document library

    Hi,
    We are managing below stuff through .net application
    1)Uploading the document  to current Month folder in a document library , While uploading a document check for the current month folder , if it does not exists create a new folder with month and year format.
    2) After uploading a document, storing the file URL in SQL table i.e. through stored procedure.
    3) While retrieving we are using the DB link to display the pdf in application.
    Now have migrated this to SharePoint 2010
    We are using share point 2010 document library, with multiple folders. The library has now exceeded 5,000 items.
    As a result it is not allowing the users to update the documents to a document library, now we are receiving a list view threshold error.
    So now my question is if I increase the threshold value, will it be proper solution?
    After increasing the threshold value, will the performance be affected?
    Please share your ideas/thoughts on the same.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    Instead of increasing the threshold limit,finally i felt folder structure would be good enough i.e
    1) Generally for the bulk documents if pretty good enough i.e.
    Uploading the documents in the folder week wise of the document library.
    So in case if there are 1000 documents in the folder, count would be 1 only.
    So this is a good practice for the large number of documents to upload in document library.
    2) Coming to file path,
    After uploading the document, file path can be saved under column of type hyperlink in the list.
    Same folder structure can be followed to save file path in the list
    3) We can fetch the file path from the list to display the pdf.
    Please correct me if i am wrong.
    Regards,
    Naga Sudheer M
    Thanks & Regards, Sudheer

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Getting an error while copying pdf file into RMS enabled document library using copyTo() method

    In SharePoint 2010, I am trying to copy pdf file programmatically from a non-RMS protected document library into RMS protected library using copyTo() method.
    But I am getting an error while doing so. it gives error as mentioned below -
    This library does not accept files of the given type. You must either upload a
    new, unprotected file that supports rights management or re-upload a document
    that was previously downloaded from this library.
    Please suggest some solution.
    Thanks,

    Are You sure that you have give 'PDF' in caps in your program? and check whether you are getting all the datas before calling the method.
    in my program, i have used like this and it is working fine for me,
    I am getting PDF content from the form...
    DATA  ls_formoutput     TYPE fpformoutput.
      DATA  pdf_content        TYPE solix_tab.
      DATA  lp_pdf_size        TYPE so_obj_len.
    DATA  lv_mail_title      TYPE so_obj_des.
    *Attach the PDF .
          lp_pdf_size = XSTRLEN( ls_formoutput-pdf ).
          pdf_content = cl_document_bcs=>xstring_to_solix(
              ip_xstring = ls_formoutput-pdf ).
          document->add_attachment(
            i_attachment_type     = 'PDF'
            i_att_content_hex     = pdf_content
            i_attachment_size     = lp_pdf_size
            i_attachment_subject  = lv_mail_title ) .

  • Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM

    Hi,
    I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM.
    I get "Object Object" rather than actual value.
    I tried:-
    var newsCat = item.get_item('NewsCategory');
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label();
    var newsCatId = newsCat.get_termGuid();
    But, I get the error "Object doesn't support property or method get_label()"
    I also tried :-
    var newsTags = item.get_item(' NewsCategory ');
    for (var i = 0; i < newsTags.get_count() ; i++) {
    var newsTag = newsTags.getItemAtIndex(i);
    var newsTagLabel = newsTag.get_label();
    var newsTagId = newsTag.get_termGuid();
    Even now I get the error "Object doesn't support property or method get_count()"
    I have included " NewsCategory " in the load request:- context.load(items, 'Include(File, NewsCategory)');
    Any idea what the issue is? Do I have to add any *.js file using $.getScript?
    I added following .js files
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    Thanks in Advance,

    Hi Patrick,
    I already added those references. I just pasted the parts of script snippet in my initial post. To avoid confusion I am pasting here complete script.
    2.1.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    function getdata() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    var list = web.get_lists().getByTitle('Documents');
    var camlQuery = new SP.CamlQuery();
    var filterCategory = 'Solutions';
    var IDfromTaxonomyHiddenList = 15;
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef LookupId="TRUE" Name="'+filterCategory+'" /><Value Type="ID">' + IDfromTaxonomyHiddenList +'</Value></Eq></Where></Query></View>');
    /*the above CAML query successfully gets all the list items matching the criteria including "NewsCategory" managed metadata column values
    But when I try to display the value it retrieved it ouputs/emits Object Object rather than actual values */
    var items = list.getItems(camlQuery);
    context.load(items, 'Include(File,NewsCategory)');
    context.executeQueryAsync(
    Function.createDelegate(this, function (sender, args) {
    if (items.get_count() > 0) {
    var listItemEnumerator = items.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var file = oListItem.get_file();
    var name = file.get_name();
    var newsCat = oListItem.get_item('NewsCategory'); alert(newsTags.constructor.getName());
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label(); // Here it errors out with message "Object doesn't support property or method get_label()"
    var newsCatId = newsCat.get_termGuid();
    } //end while
    }//end if
    Function.createDelegate(this, function (sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(getdata, "SP.Core.js");
    </script>
    In the above script "var name = file.get_name(); " gets the exact file name.
    But the line "var newsCat = item.get_item('NewsCategory');
           alert(newsCat) //Displays [Object Object]  rather than actual value.
    Issue resolved replace "oListItem.get_item('NewsCategory');" with oListItem.get_item('NewsCategory').get_label();"
    Thanks

  • Corrupt document gets created in document library with document template using createlistitem workflowaction in visual studio workflow for office 365 solution

    Hi,
    My requirement is to create a document library associated to a custom content type with a document template associated. Also I need to create a document based on the template in this document library when a new item is created in another list by taking the
    reference ID of that new Item , I need to create the document with the name appended by ID. I need to do all this deployment using WSP.
    I have created document library with document template associated to content type by following instructions in below stated blog :http://blogs.msdn.com/b/chaks/archive/2011/05/19/deploying-a-document-template-file-in-content-type-in-a-office365-sandboxed-solution.aspx
    This works perfect for me.
    However, there are few observations, when going to Document Library > Library Settings > Advanced Settings > Document Template section - doesnt shows the Edit template link. When tried to look at the value for the document template using view source
    , it is giving me /Lists/MyDocsListInstance/Forms/template.dotx instead of the actual template file uploaded.
    Ignoring the above observation, when I am trying to create a sandbox based workflow in visual studio to create document in document library when new item is created in another list, I provide the ContentTypeID as the ID associated with the document library
    with template. 
    It creates the corrupt document at end of workflow. 
    I have tried using .docx instead of .dotx files for workflow as per solution provided in some of the post but it isnt resolving my issue.
    Any help is much appreciated.
    Regards,
    Krutika

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • Getting document no. using document id  from dms

    Dear Experts,
          I want to get Document No. using  Document ID of particuler document from DMS. Is there any Function Module which returns Document No. from Document ID. So how to get this.
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    With Regards !
    Shekh Ibrahim
    Edited by: Rob Burbank on Jan 17, 2011 4:23 PM

    Hi again,
    maybe the report DMS_KPRO_READ2 can be useful for this requirement. Other useful tables could be DMS_PH_CD1, DMS_DOC2LOIO or DMS_PHIO2FILE.
    Best regards,
    Christoph

Maybe you are looking for

  • Open Purchase orders

    Hi, I have to report OPEN PURCHASE ORDERS. 1. How can i know the particular PO i relevent to GR or not. 2. If it is relevent to GR then how do i know GR done/created or not. 3. At the same time Invoice receipt also. Please some one give me the table

  • Non-sense error message trying to create view

    Greetings All, Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production on Windows 2008R2 I am getting an error while trying to create a view. The error makes no sense in that no attempt to change a user name or password as the er

  • Get URL for List and ListItem

    Hi, I have a SharePoint List (SPList) and need to provide the URL for the list. It should be possible to copy this URL to the browsers address field and navigate to the corresponding Details or Overview View (or default view) of the list. Additionall

  • How to transfer game center data

    Hi does anyone who plays Pocket Gems Paradise Cove on ipad or iphone know how i can get the progress copyed to my mac now that they put the game out for osx i would like to play it there but would hate to have to start all over at the begining

  • How can I open firefox in maverick?

    Nothing happens when I click on the Firefox icon.