Submit to SP document library with Title pre-filled - InfoPath Dev
in

InfoPath Dev

Submit to SP document library with Title pre-filled

Last post 10-18-2012 03:41 AM by MiloM. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-17-2012 11:46 PM

    • MiloM
    • Not Ranked
    • Joined on 10-17-2012
    • Posts 3

    Submit to SP document library with Title pre-filled

    Hello,

    because of historical reasons, we store Infopath forms in SP document library (and this cannot be changed in near future).

    I'm trying to add some calculated columns in the SP list - the problem is that when form is submitted via data connection it leaves column Title blank (and column Name cannot be used in calculation). But if I upload document/form manually, Title is automatically pre-filled (i.e. it equals to the file name) which is exactly what I would like to achieve by vb.net code for submit but I haven't been able to find out how.

    I'm using Infopath 2010 and SP 2010.

    Thank you.

  • 10-18-2012 01:39 AM In reply to

    Re: Submit to SP document library with Title pre-filled

    I did not grasp whether you are talking about Title field in document library or in a SP list. and how you submit from document library to SP list Title field

    If you are submitting to a SP list Title field then it is available for calculations.  

    If you are talking about Title field in a sharepoint document library then it is OOTB and by default is not required and not shown in a sharepoint document (or form) library.
    Why are you showing and using it?
    Create in and promote a field Infopath template  that you will be able to use as calculated field Ooops, this is not possible for a sharepoint document library

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 10-18-2012 02:13 AM In reply to

    • MiloM
    • Not Ranked
    • Joined on 10-17-2012
    • Posts 3

    Re: Submit to SP document library with Title pre-filled

    Hi Gennady,

    sorry for not being clear enough. I submit to SP document library (using Data Connection). I would basicaly want to use file name for calculation (to extract some information from name), but unlike Title field this is not available for calculation. I don't need Title to be shown, but I'm looking for the way how to automatically include file name there.

    I have promoted needed fields in the template earlier, but document library doesn't support this (or I don't know about it). That is why I'm trying to get the same result through file name (form is submitted with name as combination of these fields).

  • 10-18-2012 03:12 AM In reply to

    Re: Submit to SP document library with Title pre-filled

     Submit data connection?

    The full path to Infopath XML data form file one can get in code-behind with:

    • this.Uri in C#
    • Me.Uri in VB.NET

    You can then extract a file name from with substring operations

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 10-18-2012 03:41 AM In reply to

    • MiloM
    • Not Ranked
    • Joined on 10-17-2012
    • Posts 3

    Re: Submit to SP document library with Title pre-filled

    Thanks a lot, this is exactly what I was looking for :)
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.