<?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: Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/94217.aspx</link><pubDate>Sat, 09 Nov 2013 06:13:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94217</guid><dc:creator>angieong</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94217.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94217</wfw:commentRss><description>My issue resolved.

Thank you.</description></item><item><title>Re: Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/94213.aspx</link><pubDate>Sat, 09 Nov 2013 02:30:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94213</guid><dc:creator>angieong</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94213.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94213</wfw:commentRss><description>Hi Jimmy,
Can you guide me how to count the attachment step by step?
Now i designing infopath with repeating attachment. I only want to validate at least one attachment make sure user has attached.

If user click add attachment to insert extra attachment, then 2nd attachment is going to validate as well. Moreover, the empty attachment can ignore the validation?</description></item><item><title>Re: Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/82640.aspx</link><pubDate>Thu, 13 Sep 2012 21:12:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:82640</guid><dc:creator>jeffkinzer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/82640.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=82640</wfw:commentRss><description>Great information, thank you!!!</description></item><item><title>Re: Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/33557.aspx</link><pubDate>Tue, 28 Oct 2008 04:06:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33557</guid><dc:creator>cbrown00</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33557.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33557</wfw:commentRss><description>&lt;p&gt;Jimmy...worked liked a champ!...thanks&lt;/p&gt;</description></item><item><title>Re: Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/33529.aspx</link><pubDate>Mon, 27 Oct 2008 05:10:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33529</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33529.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33529</wfw:commentRss><description>&lt;p&gt;Supposing you had a file attachment control bound to /my:myFields/my:group1/my:group2/my:fileField, where my:group2 is a repeating group, you can find the total number of file attachments in the group with&lt;/p&gt;
&lt;p&gt;count(/my:myFields/my:group1/my:group2/my:fileField)&lt;/p&gt;
&lt;p&gt;Note that this is only for explication and you don&amp;#39;t have to type this all&amp;nbsp;by hand.&amp;nbsp; In the InfoPath expression builder, you would just click &amp;quot;Insert Function...&amp;quot;, select count, double-click the underlined part and select the attachment&amp;#39;s field.&lt;/p&gt;
&lt;p&gt;This would also count the number of file attachments where a file isn&amp;#39;t attached, so&amp;nbsp;to count only the attachments that have a file attached, you can use:&lt;/p&gt;
&lt;p&gt;count(/my:myFields/my:group1/my:group2/my:fileField&lt;strong&gt;[. != &amp;#39;&amp;#39;]&lt;/strong&gt;) &amp;lt;-- note these are two single quotation marks &amp;#39;&amp;#39;, not one double quotation mark &amp;quot;&lt;/p&gt;
&lt;p&gt;You could also apply the &amp;quot;cannot be blank&amp;quot; property to the fields to ensure that they all have a file attached. Now if you want to add up the counts of file attachment fields in several repeating groups, you can sum them all up in an &lt;em&gt;eval&lt;/em&gt; function,&lt;/p&gt;
&lt;p&gt;xdMath:Eval(., &amp;quot;count(my:group1/my:group2/my:fileField1&lt;strong&gt;[. != &amp;#39;&amp;#39;]&lt;/strong&gt;)+count(my:group3/my:group4/my:fileField2&lt;strong&gt;[. != &amp;#39;&amp;#39;]&lt;/strong&gt;)+count(my:group5/my:group6/my:fileField3&lt;strong&gt;[. != &amp;#39;&amp;#39;]&lt;/strong&gt;)&amp;quot;)&lt;/p&gt;
&lt;p&gt;Note that in this case, the node paths do not begin with a forward slash, because they are all relative to the starting node (just a dot here, indicating the root node.).&lt;/p&gt;
&lt;p&gt;You won&amp;#39;t need to worry too much about the details if you use the buttons and dialogs to insert the functions and nodes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Counting Number of Occurrences of Attachment Controls Where File Attached</title><link>https://www.infopathdev.com:443/forums/thread/33528.aspx</link><pubDate>Mon, 27 Oct 2008 04:08:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33528</guid><dc:creator>cbrown00</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33528.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33528</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using 5 attachment controls scattered across a form.&amp;nbsp; Each has a repeating group so multiple files could be attached at each attachment control.&amp;nbsp; When a user completes the form, I would like a control to count how many of the files have been attached and use that ensure none of the files are missed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;How can I count the number of instances where a file has been attached?&amp;nbsp; It should count the total number of files attached.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thanks&lt;/p&gt;</description></item></channel></rss>