Rules not applied

C

CW

Is there a way to not have the built-in Infopath dialogue box appear
stating "Not all rules were applied" as an error trap? I thought I had
accomplished this task and made it a bit more, intuitive by using rules
on a submit buton with conditions that a certain field "in not blank".
 
G

Greg Collins [InfoPath MVP]

Rules cannot handle error conditions, offline scenarios, Web service issues, etc. Because of this I prefer using code for submitting.
 
C

CW

Thanks Greg. Yes I agree. One caveat.

I'm customiing a sample (I guess that doesn't really matter though) and
got around the rules question ok. What I've opted for is using a
separate rule and expression when a certain field is blank. Easy enough
to add. I want totake it further and use an expression dialog so I set
up:

concat("The following fields need to be completed:",contains(Method[. =
""], Method[. != ""]))

What I get is a true or false, easy enough, but I want to replace an
argument with a string so for example; if the field Method is blank,
return the string "Method" so the expression box would return: The
following fields need to be completed: Method.

I've done this sort of thing very easy in VBA but my form has defaulted
to JS and that is like Venuvian to me. Besides this is a rule not an
"afterupdate" of a field.

It's easy to do in Excel such as =If(arg1, arg2, expression).

Any ideas? I've searched here and MS groups and get the feeling this
relatively benign and easy task is not able to be accomplished in the
GUI portion of Infopath. :(

By the way, your earlier quick response was much appreciated.

CW
 
G

Greg Collins [InfoPath MVP]

Unfortunately XPath has no concept of "if/then/else". To do this, you need to use a series of rules with conditions, or better, use code.
 
C

CW

Yes. I would prefer to use code, it's cleaner and easier to follow
except that my form is currently in jscript and don't laugh but I hate
JS, I think it's too hard to read and write. I find VB, VB script etc
much more elegant. I suppose I could find a converter.

TX again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top