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.