OnSaveRequest - InfoPath Dev
in

InfoPath Dev

OnSaveRequest

Last post 11-24-2006 04:18 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-23-2006 08:14 PM

    • Masih
    • Not Ranked
    • Joined on 11-24-2006
    • Denmark
    • Posts 1

    OnSaveRequest

    Hi

    I have create a text field on my form, where a user can name the form by entering a short text.

    When the user clicks "save as" this name should appear in the "File name field" instead of the standard "Form1"

    How can this be done in the OnSaveRequest function?

    If there is anyone who can tell me what to do, I would greatly appreciate it.

    Thank you

    Masih
  • 11-24-2006 04:18 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694
    Hi Mash Welcome to the Forums,

    In xdocument.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 and you can write below the code in ‘OnSaveRequest#%92 function.

    var fileName = XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text + ".xml";
    XDocument.UI.SetSaveAsDialogFileName(fileName);
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.