Skip to main content

Hello everyone,

 

Inspired by the guidance of the whitepaper "The Proper Way to Attach Files in K2 InfoPath processes" I have an InfoPath form with a rule on the submit button to upload my files to a K2 SmartBox SmartObject.  In order for it to be effective, the relevant upload action has to execute before the submit action.

 

This works great in theory, but what I'm finding is that this rule runs even before form validation is checked.  That means files are being uploaded to the SmartBox and then the form fails to submit because, for example, a required field was not populated.

 

Is there someway I can force my InfoPath form to do all the validation checking and what not before my upload action takes place?

I'm hoping that's the purpose of the "Can I Submit Workflow Service" but haven't been able to find any documentation about how it works.

Or if not, can anyone suggest some solution or workaround to this?

It's been a hot minute, but I believe that we can use a form validation rule to do this. Gimme a tick and I'll check it out.


So if you click on your controls, you can open up the manage rules task pane and from there you can make custom validation rules for the little bugger such as "if blank then [action]" probably throwing the user some sort of message. This can also be done for fields and it seems to work when I fiddle with it.

http://office.microsoft.com/en-us/infopath-help/add-rules-for-validation-HA101783369.aspx


Ok so... I have a text field "Title" and a button "Submit".

I have a validation rule on title that says condition: Title is blank, screentip: Title is required.

I have an action rule on submit condition: None - Rule runs when button is clicked, set a field's value ActionName = "Submit", submit using data connection "SmartObject_Create", then submit using data connection "Submit Workflow Service".

 

If I click submit, the SmartObject create method is running before the validation.

 

What am I changing?

 

Update: I tried adding a condition to every control to say if the control is blank and the ActionName is not blank, but still having the issue.


I'm sorry to bump but I am still looking for some help regarding this.


Bumping again


Reply