?SAVE a form getting filename from a field? - InfoPath Dev
in

InfoPath Dev

?SAVE a form getting filename from a field?

Last post 06-28-2006 09:47 AM by lotusvball. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-07-2006 09:09 AM

    ?SAVE a form getting filename from a field?

    Hello,

    is it possible to have InfoPath form use fields from itself to create the name that the form is saved as?

    Example, we are using an InfoPath form to create new products in our ERP. After someone fills out the form, we want to use the product's name field to create the name of their saved form in our Sharepoint Portal.

    Please let me know if this can be done and how to do it. (couldn't find anything in SDK)

    Thanks.
  • 03-07-2006 09:34 AM In reply to

    Re: ?SAVE a form getting filename from a field?

    Hi SALMEIDA, Welcome to the forum,
    we can save infopath form using its fields as filename in sharepoint.
    Using Xpath retrieve the field , you want save as filename,
    and send as parameter for sharepoint submit code(use DAVAdapter to submit
    the form).

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 03-07-2006 12:22 PM In reply to

    Re: ?SAVE a form getting filename from a field?

    Hi,

    Here it is. What do you think?

    function XDocument::OnSaveRequest(eventObj)
    {
    var ARTIGO = XDocument.DOM.selectSingleNode("/my:myFields/my:TradeMarketing/my:codigo");

    //XDocument.UI.Alert(ARTIGO.text);
    //XDocument.UI.Alert(ARTIGO.text.replace(" ","0"));

    if (XDocument.IsNew == true || eventObj.IsSaveAs == false)
    {
    if (eventObj.IsSaveAs == true)
    {
    XDocument.UI.SetSaveAsDialogFileName(ARTIGO.text.replace(" ","") + ".xml");
    }
    eventObj.IsCancelled = eventObj.PerformSaveOperation();
    }
    eventObj.ReturnStatus = true;
    }
  • 03-07-2006 01:59 PM In reply to

    Re: ?SAVE a form getting filename from a field?

    Hi,
    I think your code is in jscript, iam not perfect in jscript,
    I use c# code to submit the form to sharepoint,
    For my knowledge in jscript, your code should work(iam not sure).

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 06-28-2006 09:47 AM In reply to

    Re: ?SAVE a form getting filename from a field?

    divFileName = XDocument.DOM.selectSingleNode
    ("/my:myFields/my:datafields/my:PromoCalendar/my:Division");

    I am having great difficulty with this line. divFileName is always Null. I can not get it to take the value of Division.

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