<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>InfoPath 2010</title><link>https://www.infopathdev.com:443/forums/142.aspx</link><description>Are you exploring new features coming up in 2010? Share information and ask questions here!</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Applying validation on Attachment field returns Fatal Exception</title><link>https://www.infopathdev.com:443/forums/thread/96130.aspx</link><pubDate>Wed, 26 Feb 2014 16:32:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:96130</guid><dc:creator>Jigs28</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/96130.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=142&amp;PostID=96130</wfw:commentRss><description>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 &amp;quot;someField=1  and attachment is blank&amp;quot; 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??</description></item></channel></rss>