Validating fields on submit but not on save - InfoPath Dev
in

InfoPath Dev

Validating fields on submit but not on save

Last post 02-19-2015 06:58 AM by Tyler Hyland. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-16-2015 12:36 PM

    Validating fields on submit but not on save

    I've prepared an infopath form that will be used for general auditing tasks. The form includes header information (e.g. audit description, audit type, physical location of audit, date, time) and one or more audit findings in a repeating table. The form includes two buttons, a Save button and a Submit button. The Save button allows the user to temporarily "save" the form to the library to complete at a later time. The Submit button "submits" the form to the library to be reviewed by a manager. From the standpoint of the forms library, the only difference between the two buttons is that the Submit button sets a Boolean field in the main data source to true, which will ultimately cause a workflow associated with the forms library to execute, sending the form to a manager for review. I'm automatically generating the name of the form using the audit type, location, date, and time fields. As such, those fields must be populated prior to saving or submitting. There are other fields, however, that I would like to be optional if the user saves the form but required before the user can submit the form. Specifically, the audit description and the findings. To handle this, I added an xml resource file as a secondary data source. In it, I've included a "IsSubmitting" field. On form load, I set the "IsSubmitting" field to false. I then assign a validation rule to the audit description field with a condition of "Audit Description is blank and IsSubmitting = true". This condition should fail when the form is first loaded because I've set the "IsSubmitting" field to false. However, the condition is returning true and I can't seem to figure out why. I've attached the form for your review.
  • 02-16-2015 02:59 PM In reply to

    Re: Validating fields on submit but not on save

    Since the field is in a 2DS, unless you manually modify the 2DS schema, it will be a string datatype. Try setting to "false" (lowercase string) and "true" instead of the true and false functions, and try in your validation checking for the strings "true" or "false" rather than using the functions - does that make sense?

    Hilary Stoupa

  • 02-19-2015 06:58 AM In reply to

    Re: Validating fields on submit but not on save

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