Submit button - InfoPath Dev
in

InfoPath Dev

Submit button

Last post 07-17-2010 06:51 AM by Skarn. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-16-2010 11:13 AM

    • Lawson
    • Top 100 Contributor
    • Joined on 12-24-2009
    • Virginia
    • Posts 91

    Submit button

    I have created a form in IP 2003 with many different attachment fields. My users will attach documents to this form and press a submit button with the following C# code:

    this.thisXDocument.SaveAs(@"PATH" + ContractNumber + DateTime.Now.ToString("yyyy.MM.dd_HH.mm.ss.ff") + ".xml"); this.thisApplication.Quit(true); 

    I have a problem with this method of transfering the form from the user to me. Our users store these forms on a shared drive. However, the forms can be extremely large, and the forms are eating up space on the shared drive.

    Once the user presses the submit button I have coded, is there anyway to take the form from the user?

    This may eliminate the space issues on the shared drive.

     

  • 05-16-2010 02:04 PM In reply to

    What exactly do you want to happen after the user clicks submit

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 05-16-2010 05:35 PM In reply to

    • Lawson
    • Top 100 Contributor
    • Joined on 12-24-2009
    • Virginia
    • Posts 91

    I would like the form to be saved to a specific path on the shared drive, and I would like to take the form from the user, ie the user would no longer have access to it.

  • 07-17-2010 06:51 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    You could dump the XDocument.xml property to a text file - but I don't know how you would 'remove' the user's access - you'd have to adjust file permissions?? Perhaps you could use a shell command to cacls.exe (could be dangerous).

    Another way, if superficial 'hiding' from user is suitable - before saving to file you could set a 'flag' field to a value. Then have a rule on form open which if that field = value it should switch to a BLANK view. If the user finds the form that was saved and tried to open it - it will display as blank.

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