default file name. - InfoPath Dev
in

InfoPath Dev

default file name.

Last post 06-07-2005 12:09 PM by Agni Jonnalagadda. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-24-2005 02:50 PM

    • Jovix
    • Not Ranked
    • Joined on 05-10-2005
    • USA
    • Posts 6

    default file name.

    When closing and saving a form, is there a way for infopath to pull the value within a field and use it as the form name?

    TIA,
    Jovix
  • 05-25-2005 02:23 AM In reply to

    Hi Jovix,
    Welcome to the Forum!
    I dint see any direct way to set filename on saving the form.
    We can access filename from "SaveEvent", but cannot change filename property on "SaveEvent" object because it is a readonly property.

    We can set filename when the form is submitted instead of saved.

    If you find a way to set filename on save please let us know.

    Thanks



    Agni
    InfoPathDev India
  • 05-25-2005 02:07 PM In reply to

    I was looking at thisxdocument.UI object, there is method called "SetSaveAsDialogFileName" method. This method prefills the filename in the save dialog box's filename area.

    This method takes one "string" argument that is filename.

    This maynot solve your problem totally but will help you to some extent.

    Agni
    InfoPathDev India
  • 06-07-2005 08:38 AM In reply to

    • Jovix
    • Not Ranked
    • Joined on 05-10-2005
    • USA
    • Posts 6
    I found a solution that worked for me, here it is for those who are interested...

    In design mode of your form's template, go to Tools, Data Connections. Click on Add, and then follow the wizard to help set the type of Data Connection you want. In the Data Connections Wizard, when you reach the point to enter the form name that you want, you can click the function button next to the field and then select one of the form fields as the form name. What this will do is take the value that is on that field and uses it as the form name, which is what I wanted.
  • 06-07-2005 12:09 PM In reply to

    If it is a dataconnection you can actually set filename in the forms code itself.
    Here is the set of code lines that would help you in setting the filename for a sharepoint connection in the code(c#)
    DAVAdapter oSharePoint = (DAVAdapter)thisXDocument.DataAdapters["SharepointSubmit"];
    oSharePoint.FileName = sSharePointFileName;
    oSharePoint.FolderURL = sSharePointFolder;
    oSharePoint.Submit();

    Agni
    InfoPathDev India
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.