I am Having Attachment Field in Infopath 2010 form, i want to make it mandatory on some condition, when i set the validation rule on attachment filed and i check condition like "someField=1 and attachment is blank" then cannot be blank it returns Fatal Exception.
I tried it from code, I can Successfully make it mandatory by checking additional flag filed == 1 but after user adds attachment, mandatory (astrik) mark should get clear I tried to Clear flag using Attachment Change Event by setting flag field to again 0 but setting filed value in attachment Change event returns same exception. c_DisplayClass1.Setvalue
What can be wrong??