locked
Infopath 2007 session issue RRS feed

  • Question

  • Hi Guys - I have a problem handling session in Infopath , im using MOSS 2007 and we are using infopath forms(open in client application) to save data to a form library, however when i tried to save a form without closing the infopath, it overwrite the previous data that i save, w/c means it edited the 1st form that i created. My question is how to clear the session upon saving the infopath form? i created two buttons [save and close], and [save and clear], when i tried to save and clear, then create another item,. it overwrites the 1st item.

    thanks in advance.


    ®©™½¼
    Monday, December 26, 2011 10:48 AM

Answers

  • Hi jwill,

    That looks right to me.  When you set FormName to be blank did you happen to accidently put a space in?  Make sure there is no space there.  That's the only thing I can think of right now as to what might be wrong with it. 

    Another thing to try is separate the button while you're testing it - Make a Save button and a Clear button.  Also, temporarily drop all of the hidden fields (i.e. SaveName and FormName) so you can see when the value gets set and when it clears. 

    Melissa

    • Marked as answer by jwill92 Monday, January 2, 2012 8:05 AM
    Tuesday, December 27, 2011 2:05 PM

All replies

  • In your clear button you need to clear the field you use to name the form and set it to a new one.  I personally use the ID field from the SharePoint library to ensure a unique name.  How are you currently naming the form?
    Monday, December 26, 2011 2:43 PM

  • Thanks Melissa for the reply.. :)

    Here is how i set up the button.

    I created 2 rules in saving wherein:

    [Save and Clear] Rule1

    Condition: FormName is blank

    Acions:
    Set a field's value: FormName = SaveName
    Submit using a data connection : Sharepoint Library Submit
     


    hiddenfield SaveName = concat(RequestType, now())
    field RequestType = (3 types)

    [Save and Clear]Rule 2 - Clear

    Actions:
    Set a field's value: FirstName = ""
    Set a field's value: LastName = ""
    Set a field's value: Phone = ""
    Set a field's value: FormName = ""

     

    Here now the scenario.. :)
    When i open the form and fill up the fields then hit save and clear,
    i see the item i created in the form library list, however when i tried to
    create again(without closing the form), i encountered this error:

    InfoPath cannot submit the form.
    An error occurred while the form was being submitted.
    A value in the form may be used to specify the file name. If you know the value in the form that specifies the file name, revise it and try again. Otherwise, contact the author of the form template.

     

    Am i doing the right thing in clearing the FormName? and suppose to be in the Rule1, FormName is getting a value from SaveName


    Any idea what is missing? Thank you

     

     

     


    ®©™½¼
    Tuesday, December 27, 2011 5:56 AM
  • Hi jwill,

    That looks right to me.  When you set FormName to be blank did you happen to accidently put a space in?  Make sure there is no space there.  That's the only thing I can think of right now as to what might be wrong with it. 

    Another thing to try is separate the button while you're testing it - Make a Save button and a Clear button.  Also, temporarily drop all of the hidden fields (i.e. SaveName and FormName) so you can see when the value gets set and when it clears. 

    Melissa

    • Marked as answer by jwill92 Monday, January 2, 2012 8:05 AM
    Tuesday, December 27, 2011 2:05 PM