<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119252.aspx</link><pubDate>Mon, 18 Jun 2018 14:11:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119252</guid><dc:creator>mveron</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119252.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119252</wfw:commentRss><description>Hi Hilary 

Thanks, it worked perfectly. Apologize for my late response, I had to take care of a personal situation but Im back!. 

I have one more question that came across the other day, I hope this is my last. Is it possible to count values and get the next number following the sequence?. Look at below example. 

I have a list of numbers that were taken: 

1001 
1002
-&amp;gt; 1003
1004
1005
-&amp;gt; 1006
-&amp;gt; 1007
1008


What Im trying to do is to count all the values based on what I asked you on my previous questions but also to get the next number to continue the sequence, in this case it will be 1003 and next time it will be 1006 and so on. The reason of this requirement is due to we have a list of devices with a number previously assigned and we have to migrate the list to the new SharePoint site, once this is completed we will enable the form. 

Please let me know if you need further clarification.


Regards.</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119154.aspx</link><pubDate>Thu, 31 May 2018 21:42:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119154</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119154.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119154</wfw:commentRss><description>Try the attached - You&amp;#39;ll see on the location field I disabled your initial rules and added one to set query fields &amp;amp; query, then another for the count. I changed your secondary data connection to not query on load. You&amp;#39;ll probably want similar rules on Device, in case someone changes that after initially setting both fields. :-)</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119149.aspx</link><pubDate>Thu, 31 May 2018 17:24:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119149</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119149.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119149</wfw:commentRss><description>Absolutely - you can add as many fields as you need to the filter. However, how large do you expect your list to get? I&amp;#39;ll modify a copy of your form later today to leverage query fields. Then you&amp;#39;ll only be pulling back the data you need to count and you can get rid of your Key field.</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119148.aspx</link><pubDate>Thu, 31 May 2018 16:37:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119148</guid><dc:creator>mveron</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119148</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I tried selecting fields from diffent sources and everytime I checked the xPath syntax I saw GetDOM instead of get-DOM, even when I selected query fields instead of data fields. Perhaps Im doing something wrong but looks more related to a bug. &lt;br /&gt;&lt;br /&gt;In the other hand, last questions, is it possible to run a count based on 2 fields like &lt;b&gt;count(field1[. = xxxx] and field2[. = xxxx])&lt;/b&gt;. I created the key field for this reason due to I needed to match devices and location to get a unique value. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119141.aspx</link><pubDate>Thu, 31 May 2018 15:09:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119141</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119141.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119141</wfw:commentRss><description>GetDOM is the secondary data connection. get-DOM() is the main connection. You may have been selecting the filter fields correctly, but accidentally selected the query field in the main DS instead of the data field - that&amp;#39;s an error I&amp;#39;ve seen before. :-)</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119139.aspx</link><pubDate>Thu, 31 May 2018 13:16:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119139</guid><dc:creator>mveron</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119139.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119139</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks you Hilary!!! It worked perfectly, finally is counting as it should. I noticed in the formula the difference between GetDOM and get-DOM(), is that what you refer to when talking about query filed?. I would like to now more about it. &lt;/p&gt;&lt;p&gt;I appreciate your help, you made my day :D.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regards. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119134.aspx</link><pubDate>Wed, 30 May 2018 23:05:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119134</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119134.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119134</wfw:commentRss><description>Your instinct is right - you needed a secondary data connection to return all the records from the list so you could count them. Personally, I would probably set that data connection to NOT run when the form is opened, and instead, on the Key field, set the query field in the secondary data connection to the current key, then run the query. Then you&amp;#39;d only get back the matching rows, and you could count w/out a filter. :-) However, here&amp;#39;s a copy of your form with what I think will work for your filter. Save the file locally, right click and select design to open in design mode, then you can preview. Let me know if you&amp;#39;d like more details on using a query field to &amp;quot;pre-filter&amp;quot; the data!</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119133.aspx</link><pubDate>Wed, 30 May 2018 22:17:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119133</guid><dc:creator>mveron</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119133.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119133</wfw:commentRss><description>&lt;p&gt;Hi Hilary. Thanks for replying. I attached a copy of the form to the post. Please check the rules set for the Location field, the second one is the rule for counting records in the list. I created a seconday connection VCMainV2-Read for this purpose which is pointing to the same SP list (main) due to when I tried count(Key [. = Key]) didn´t work, I guess it is because is referencing to the same field therefore a secondary connection must be created. &lt;/p&gt;&lt;p&gt;Regards. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119125.aspx</link><pubDate>Wed, 30 May 2018 17:17:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119125</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119125.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119125</wfw:commentRss><description>Any chance I can get you to attach a copy of your form under the Options tab in a reply?</description></item><item><title>count() not counting - InfoPath2013</title><link>https://www.infopathdev.com:443/forums/thread/119117.aspx</link><pubDate>Wed, 30 May 2018 01:47:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119117</guid><dc:creator>mveron</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/119117.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=119117</wfw:commentRss><description>&lt;p&gt;Hi Everybody. I need your help!. I created&amp;nbsp; a basic InfoPath 2013 form for a SharePoint list and can´t figure out why the count() function is not returning the expected result. I created a form with 4 fields (Device - Location - Key (Device + Location) - Number).&amp;nbsp; The first two fields are drop-down lists. The first one gets the data from another SP list containing devices name, the second drop-down it has a list of cities listed in a second SP list and the Key field is basically the result of concatenating Devices and Location. Im trying to get the number of records in the main SP list (I assume it is the one for the form) that match the key field but for some reason isn´t counting. I created a rule for the Location field to set the Key field value with the result of concat(Device + Location) and then set the Number field with the result of count(Key [. = &amp;quot;Key&amp;quot;]. I created a secondary data connection to the main list trying to make this work but after many attemps I had not good results. See below example:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Device: IPad&lt;br /&gt;Location: Chicago&lt;br /&gt;Key: IPadChicago&lt;br /&gt;DNS: xxxx&lt;/p&gt;&lt;p&gt;If there are two records in the main list having for example &amp;quot;IPadChicago&amp;quot; in the Key field then the next DNS number should be 3 as the result of count(Key [. = Key] + 1. For some reason the the formula is not retrieving the value of the key field at the time of running the count() function so Im wondering if there is something that Im doing wrong or if this is a bug. This is a very simple form as you can see and the only way I could make the count() function to work was by hardcoding the value i.e. count(Key [. = &amp;quot;IPadChicago&amp;quot;]) but this is not very usefull. &lt;/p&gt;&lt;p&gt;Thanks you very much for your time and I appreciate your help.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>