<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Form Completion Percentage in VB</title><link>https://www.infopathdev.com:443/forums/thread/35760.aspx</link><pubDate>Mon, 15 Dec 2008 10:45:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35760</guid><dc:creator>Frederik Van Lierde</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35760.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35760</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you nned this in VB?&amp;nbsp; There are way to to this out-of-the-box.&amp;nbsp; All depends an how your datasource is structured.&amp;nbsp; The fields you like to count, are they&amp;nbsp; just fields under the root, or are they fields within a repeating node ?&lt;/p&gt;
&lt;p&gt;The next example shows the xpath to calculated the percentage of how many lines were filled in correctly within a repeating node&lt;br /&gt;So i éade an extra field ControlIsExecuted related to rules to be sure and gets Y as all fields are fillid in, otherwhise N&lt;/p&gt;
&lt;p&gt;count(&lt;strong&gt;/my:expenseReport/my:MyControls/my:MyControl&lt;/strong&gt;/my:ControlIsExecuted[text() = &amp;quot;Y&amp;quot;]) &lt;strong&gt;div&lt;/strong&gt; count(/my:expenseReport/my:MyControls/my:MyControl) * 100&lt;/p&gt;
&lt;p&gt;/my:expenseReport/my:MyControls/my:MyContro 0 repeating node&lt;br /&gt;ControlIsExecuted = the fields i need to check&lt;br /&gt;div = divide&lt;/p&gt;
&lt;p&gt;I hope this directs you to a solution (outside VB)&lt;/p&gt;</description></item><item><title>Re: Form Completion Percentage in VB</title><link>https://www.infopathdev.com:443/forums/thread/35745.aspx</link><pubDate>Sat, 13 Dec 2008 14:15:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35745</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35745.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35745</wfw:commentRss><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid it really isn&amp;#39;t as simple as that, in C# or in VB.&amp;nbsp; I will try to think of a way to determine the number of completed nodes vs. the number of nodes in the form and will get back to you soon.&lt;/p&gt;</description></item><item><title>Re: Form Completion Percentage in VB</title><link>https://www.infopathdev.com:443/forums/thread/35733.aspx</link><pubDate>Fri, 12 Dec 2008 13:38:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35733</guid><dc:creator>Christoffel de Gruyter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35733.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35733</wfw:commentRss><description>&lt;p&gt;int numberOfFields = nodeList.Count;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Courtesy of Shiva :).&lt;/p&gt;</description></item><item><title>Re: Form Completion Percentage in VB</title><link>https://www.infopathdev.com:443/forums/thread/35732.aspx</link><pubDate>Fri, 12 Dec 2008 13:34:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35732</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35732.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35732</wfw:commentRss><description>&lt;p&gt;If you show us the C# code you have, somebody here would be happy to give you the VB equivalent.&lt;/p&gt;</description></item><item><title>Form Completion Percentage in VB</title><link>https://www.infopathdev.com:443/forums/thread/35730.aspx</link><pubDate>Fri, 12 Dec 2008 12:15:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35730</guid><dc:creator>Christoffel de Gruyter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35730.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35730</wfw:commentRss><description>&lt;p&gt;Hey, I have asked this question before and I did get a reply but only in C#.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sadly, I now found out that my entire form is made in VB, not C.&lt;/p&gt;
&lt;p&gt;My question is really, could anyone give me code that calculates how many fields are filled in and converts that into a percentage?&lt;/p&gt;
&lt;p&gt;This would be very usefull for my metadata, I&amp;#39;m kinda stuck with it. I need to learn my .net soon!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the help.&lt;/p&gt;</description></item></channel></rss>