Rule based submit options - InfoPath Dev
in

InfoPath Dev

Rule based submit options

Last post 12-10-2009 02:20 PM by stickneyb. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 12-08-2009 12:53 PM

    • stickneyb
    • Not Ranked
    • Joined on 04-21-2009
    • Wisconsin
    • Posts 6

    Rule based submit options

    Hello IP folks.

    I am hoping that someone may be able to assist with my problem.

    I have an InfoPath browser based form developed in IP 2007.  This form does have custom code pulling from several different SP libraries for a number of different things.

    Up to this point, I have been using the Submit and Save buttons in the top and bottom toolbar.  However that has caused some issues... so here is what I have done thus far

    1. Eliminate the Save button from the toolbar.

    2. Created a FormID field, which is then set by a SP workflow to = the name of the form.

    3. Created a status field in form with In Progress, submitted, and completed.  The stages are simple, I have an approval workflow (also custom) setup to wait for the status field to be submitted.  Until then it just remains in a paused state.  Reason for this, is to allow people to come back and update the form.

     So, someone opens a new form (browser only) and fills it out.  They set the status to In Progress, and submits it.  

    Submit has two rules on it.  If FormID is blank (by default it is, receives value after workflow launches) the the submit calculates a file name and saves the form to a library.  No overwirte is allowed.

    Second rule, if someone opens the form back up and makes changes, checks the FormID for a value.. if there is a value, then the form is submitted with the name being FormID, and overwrites are available.

     

    I keep getting the following error when first submitting a form: Runtime - Data C    82g0    Warning     Form submission failed. (User: REMOVED, Form Name: Test Form, IP: , Request: http://SERVER/_layouts/Postback.FormServer.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:Test-Form:-myXSD-2005-10-21T21-12-27, Type: DataAdapterException, Exception Message: 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.)    ff414eae-e724-47af-8b94-fab8acfcd049

     

    I can't seem to find what is causing the error.  Both rules are flagged to stop processing after the rule is run.

     

     

    Thanks

    Ben
  • 12-09-2009 02:00 AM In reply to

    Re: Rule based submit options

     

    can you attach the form so that we can have a look at it.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 12-09-2009 06:35 AM In reply to

    • stickneyb
    • Not Ranked
    • Joined on 04-21-2009
    • Wisconsin
    • Posts 6

     Sure.  It is just a test form.  No real structure as far as production would look... but it has what I am trying to do on it.

    Thanks

    Ben
  • 12-09-2009 09:59 PM In reply to

    Re: Rule based submit options

    hi ben,

    instead of using a workflow and other things

    just create a new field and set its default value to concat("CRF ", max(@ID) + 25000)

    and uncheck the check box (Update the value when the result of this formula is recalculated).

    you dont need two submit connectons, just one should be enough and in the file name for submit specify your new field

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 12-10-2009 06:17 AM In reply to

    • stickneyb
    • Not Ranked
    • Joined on 04-21-2009
    • Wisconsin
    • Posts 6

    Re: Rule based submit options

    Unfortunately, we can't do it that way.  The name, since it is using the ID, can't be set until it is submitted.  Otherwise, we get CRF's that clash if two people are working in the system at the same time. 

     That being said, the naming isn't the issue... I am more trying to allow people to save their changes without a save button in the title bar.  That is the real problem right now.  How can I use submit to save changes?  If code is required, that is find, I am willing to do that...

     

    Thanks for the response.

     

    Thanks

    Ben
  • 12-10-2009 12:30 PM In reply to

    Re: Rule based submit options

    there is no direct way of saving the form in browser enabled infopath 07 forms, a work around is to use submit connection to save the form. you will have to take caution in setting data validations and stuff.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 12-10-2009 02:20 PM In reply to

    • stickneyb
    • Not Ranked
    • Joined on 04-21-2009
    • Wisconsin
    • Posts 6

    Re: Rule based submit options

    Yep, and that is what I am trying to do, but it will not save the changes.

     I have two rules on my submit, the first looks to see if it is a new form, the second if it is just changes... but it doesn't save the changes.

    Thanks

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