<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Expose Mandatory property</title><link>https://www.infopathdev.com:443/forums/thread/14219.aspx</link><pubDate>Mon, 23 Jan 2006 21:47:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14219</guid><dc:creator>qwer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14219.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14219</wfw:commentRss><description>MFaus,&lt;br /&gt;&lt;br /&gt;I have tried the ways you mentioned, but have no luck. Perhaps I am not doing it right. I am using VBScript, would there be any difference?</description></item><item><title>Re: Expose Mandatory property</title><link>https://www.infopathdev.com:443/forums/thread/14218.aspx</link><pubDate>Wed, 18 Jan 2006 02:33:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14218</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14218.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14218</wfw:commentRss><description>Hm, haven't tried this before - try this out:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var oNode = XDocument.selectSingleNode( "my:myFields/my:field1" );&lt;br /&gt;&lt;br /&gt;var oMinOccurs = oNode.selectSingleNode( "@minOccurs" );&lt;br /&gt;&lt;br /&gt;if( oMinOccurs.text == "1" )&lt;br /&gt;{ /* node is required */ }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Also, if that doesn't work you could try using oNode.getAttribute( "@minOccurs" ). Like I said, I haven't tried this, but it seems like it should work.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Expose Mandatory property</title><link>https://www.infopathdev.com:443/forums/thread/12749.aspx</link><pubDate>Tue, 17 Jan 2006 00:27:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12749</guid><dc:creator>qwer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12749.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12749</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;Does anyone know how to check whether a data field is mandatory by code?&lt;br /&gt;&lt;br /&gt;Thanks</description></item></channel></rss>