Fix Validation Errors Before Running Actions - InfoPath Dev
in

InfoPath Dev

Fix Validation Errors Before Running Actions

Last post 06-30-2014 03:05 AM by stuck. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-24-2014 11:02 AM

    • stuck
    • Top 150 Contributor
    • Joined on 03-26-2008
    • Posts 74

    Fix Validation Errors Before Running Actions

     Hi,

    I am stuck with a very irritating problem.

    I have a custom submit button which Runs these actions:

    ------------------------------------------------------------------------------------

    Set a field's value: RevisionCount = RevisionCount + 1

    Submit using a data connection: SharePoint Library Submit

    Close this form: No Prompt 

    ------------------------------------------------------------------------------------

    I also have a number of validation rules which checks that fields are not blank etc.

    The problem is, everytime I click on Submit button and when there are validation errors, my RevisionCount is calculated (+1). This should not happen before all the validations have been corrected. Otherwise it keeps adding and adding everytime the submit button is pressed.

    Please tell me there is a way around this as this is a big show stopper for me to deploy this form.

    Many thanks. 

     

     

  • 06-27-2014 02:05 AM In reply to

    Re: Fix Validation Errors Before Running Actions

    Hi,

    This is indeed a tough problem. A workaround I could think of is by using a hidden Boolean field (false by default), and name the field isClicked, and set it to true if the submit button is clicked. After adding this, add a condition to the RevisionCount rule which should only be triggered if isClicked is not equal to true. This way it would only run once.

    If you need to re-use the form, you can add a form load rule to set the isClicked value to false. This way, the RevisionCount rule could run again. Is this approach possible for you?

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 06-30-2014 03:05 AM In reply to

    • stuck
    • Top 150 Contributor
    • Joined on 03-26-2008
    • Posts 74

    Re: Fix Validation Errors Before Running Actions

     Hi,

    Thanks for this. However, I managed to add the Revision count elsewhere in the form (when a radio button is selected).

      

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