<?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: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/43042.aspx</link><pubDate>Tue, 16 Jun 2009 20:19:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43042</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43042.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=43042</wfw:commentRss><description>&lt;p&gt;What I think you should do is first try to get the preceding sibling part of the formula right. When done correctly, you should have basically a row counter in the milestone id field, so I&amp;#39;d think from your data source:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;count(../preceding-sibling::d:msdbMilestone1/@MilestoneDetaiID1) + 1&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;After you have that working, and basically have a row counter, then you can work on getting the text into it, and finally, if you need it to be conditional, add that last....&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/43019.aspx</link><pubDate>Tue, 16 Jun 2009 14:30:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43019</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43019.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=43019</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;I tried your suggestion and nothing happened.&amp;nbsp; there&amp;#39;s no condition in it.&amp;nbsp; But when I type a one into the first node field, nothing happens to the others. I&amp;#39;ve tried playing about with it but to no avial.&amp;nbsp; it&amp;#39;s weird cause I&amp;#39;ve tried to copy your technique to the t but not getting the same results.&amp;nbsp; Looks like I&amp;#39;m loosing the battle on this one.&amp;nbsp; Maybe I&amp;#39;ll suprise myself.&lt;/p&gt;
&lt;p&gt;the field that has the formula is @MilestoneDetaiID1 which is the field that will&amp;nbsp;be populated with the incremental value.&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42760.aspx</link><pubDate>Thu, 11 Jun 2009 13:22:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42760</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42760.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42760</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m back from holiday.&amp;nbsp; I&amp;#39;ll work on your suggestion on Monday (you know what it&amp;#39;s like when you come back to work to find 800 emails lol)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42563.aspx</link><pubDate>Sat, 06 Jun 2009 07:06:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42563</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42563.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42563</wfw:commentRss><description>&lt;p&gt;I would recommend you take the formula apart a bit. Start with making sure you are getting your incrementing number correctly. So try just (../preceding-sibling::*/@MilestoneDetaiID1) and see what you get. It sounds like right now you are getting &amp;#39;0&amp;#39;, which explains one of the &amp;#39;1&amp;#39;s in your &amp;#39;11&amp;#39;. &lt;/p&gt;
&lt;p&gt;What field in your data source is this default being set on?&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42213.aspx</link><pubDate>Thu, 28 May 2009 14:48:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42213</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42213.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42213</wfw:commentRss><description>&lt;p&gt;Hi Hilary, unfortunately I&amp;#39;m away on holiday tomorrow for a week so I&amp;#39;ll have to postpone this thread until then.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve managed to get rid of the error with the code below but the controls all give me &amp;#39;11&amp;#39; when I select 1 drom the drop-down (I&amp;#39;ve only tested&amp;nbsp;the code with the first part of the code below).&amp;nbsp; rather than the first field giving me 1 and the second field giving me 2 etc.&amp;nbsp; I&amp;#39;ve tried numerous attempts but all the fields in each section end up being populated with 11.&lt;/p&gt;
&lt;p&gt;Hope that helps you help me :)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Paul&lt;/p&gt;
&lt;p&gt;substring(concat(&amp;quot;1&amp;quot;, count(../preceding-sibling::*/@MilestoneDetaiID1) + 1), 1, (&lt;a href="mailto:../../@ProjectTypeFK"&gt;../../@ProjectTypeFK&lt;/a&gt; = 1) * string-length(concat(&amp;quot;1&amp;quot;, count(../preceding-sibling::*/@MilestoneDetaiID1) + 1)))&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42212.aspx</link><pubDate>Thu, 28 May 2009 14:37:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42212</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42212.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42212</wfw:commentRss><description>&lt;p&gt;Hi, Paul:&lt;/p&gt;
&lt;p&gt;Is the error on the count of the preceding sibling section? Or the part you&amp;#39;ve highlighted in blue? &lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42148.aspx</link><pubDate>Wed, 27 May 2009 09:39:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42148</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42148</wfw:commentRss><description>&lt;p&gt;Hilary, you&amp;#39;re a GEM! This looks like the resolution I was looking for.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve spent a bit of time with it and am having difficulty with the syntax because I&amp;#39;m using fields from a database.&amp;nbsp; I&amp;#39;ve tried this&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;substring(concat(&amp;quot;1&amp;quot;, count(/preceding-sibling::msdbMilestone1/@MilestoneDetaiID1) + 1), 1, (&lt;a href="mailto:../../@ProjectTypeFK"&gt;../../@ProjectTypeFK&lt;/a&gt; = 1) * string-length(concat(&amp;quot;1&amp;quot;, count(/preceding-sibling::msdbMilestone1/@MilestoneDetaiID1) + 1)))&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ve taken some of the elements and played about with it but no joy!&amp;nbsp; I&amp;#39;ve asked for quite a lot from you. Perhaps you can help me just a little more.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached a screen shot of the default values that I&amp;#39;d be using, maybe you could help me with the syntax?&lt;/p&gt;
&lt;p&gt;Many thanks again :)&lt;br /&gt;Paul&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42087.aspx</link><pubDate>Tue, 26 May 2009 22:56:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42087</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42087.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42087</wfw:commentRss><description>&lt;p&gt;Do you know what the values will be for those 4 choices in the drop downs? Are those values pretty static? Here&amp;#39;s one more try with a default value set up (sample in header again).&lt;/p&gt;
&lt;p&gt;If you end up needing to add code to your form, I&amp;#39;d suggest making sure you set the programming language to C# first -- you&amp;#39;ll find more samples&lt;strong&gt;. Tools / Form Options / Programming&lt;/strong&gt;. &lt;a href="http://www.bizsupportonline.net/infopath2007/loop-through-items-repeating-table.htm"&gt;This&lt;/a&gt; blog post by S.Y.M Wong-a-Ton may help you get started....&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42055.aspx</link><pubDate>Tue, 26 May 2009 09:57:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42055</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42055</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve had a look at the form, and this techniqe&amp;nbsp;is very close to what I&amp;#39;m looking for.&amp;nbsp; There is, however, one problem.&amp;nbsp; The technique would have to be more conditional.&amp;nbsp; For example, if &amp;#39;first choice&amp;#39; is selected from the drop down, the values in &amp;#39;field2&amp;#39; would be from 1-7, if the &amp;#39;second choice&amp;#39; was selected from the drop down, the values would be from 8-15, Third choice 16-23 etc.&lt;/p&gt;
&lt;p&gt;There are 4 choices in the actual drop down list I&amp;#39;ll be using and there will be 7 repeating sections (7 nodes).&amp;nbsp; The values that populate &amp;quot;field2&amp;quot; represent project stages.&amp;nbsp;In the real forms they are keys that reference a lookup table that has the descriptions of the project stages and each project description is different with each of the 4 choices in the drop down list (choice one has a different set of descriptions, hence the different keys)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m thinking I may need code for this... perhaps you know of some articles that can specifically help me with this as I&amp;#39;ve not coded with Infopath yet.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Many thanks&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42054.aspx</link><pubDate>Tue, 26 May 2009 09:29:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42054</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42054.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42054</wfw:commentRss><description>&lt;p&gt;This looks like it may work, and if it does I&amp;#39;ll buy you a big bunch of flowers one day :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I take it this technique can be used for repeating sections; 7 of them, as shown in the screenshots?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have a look at this at some point today and get back to you... Thanks again Hilary&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42041.aspx</link><pubDate>Mon, 25 May 2009 23:19:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42041</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42041.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42041</wfw:commentRss><description>&lt;p&gt;Hi--&lt;/p&gt;
&lt;p&gt;Check out the attached sample form. Right click the link in the header of this post and save the file locally. Then open in design mode (right click and select design) and preview the form. Selecting values from the drop down at the top will populate values in the repeating table below. The default on the field in the table is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;concat(substring(concat(../../../my:field1, &amp;quot; &amp;quot;, count(../preceding-sibling::my:group2/my:field2) + 1), 1, (../../../my:field1 != &amp;quot;&amp;quot;) * string-length(concat(../../../my:field1, &amp;quot; &amp;quot;, count(../preceding-sibling::my:group2/my:field2) + 1))), &amp;quot;&amp;quot;)&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Basically, if nothing is selected in the drop down, nothing displays in the fields in the repeating table. But once a selection has been made, you get the value of that field, a space, and an incrementing number....&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/42032.aspx</link><pubDate>Mon, 25 May 2009 12:32:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42032</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42032.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42032</wfw:commentRss><description>&lt;p&gt;Hi Hilary, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;The insert fields where used, the suggestion is not quite what I was looking for however.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached some screenshots to elaborate what I mean.&amp;nbsp; The drop down list adds values to the Main parent table (msdbProjects) and depending on that value, I&amp;#39;d like the node fields populated appropriately.&amp;nbsp; As you can see from screenshots 3 - 4, if the drop down list value is [Choice One] then there are specific values that enter the three tables Field_IDs (these ID&amp;#39;s being the same field but a three rows are created in the database).&lt;/p&gt;
&lt;p&gt;If I go to [Default Values] and put the formula you suggested in one of the nodes field_Id&amp;#39;s, then the formula is carried to all of the nodes and this would mean that each of the repeating section controls (Field_ID) &amp;nbsp;would have the same value.&lt;/p&gt;
&lt;p&gt;I hope this help explain and thanks for your patience on this:)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/41961.aspx</link><pubDate>Fri, 22 May 2009 14:40:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41961</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41961.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=41961</wfw:commentRss><description>&lt;p&gt;If you need a row counter -- that is, an id for each row that increments by one, check out &lt;a href="http://www.infopathdev.com/files/folders/examples/entry41112.aspx"&gt;this&lt;/a&gt; sample form.&amp;nbsp;I&amp;#39;m still having a really hard time understanding what you are trying to do,&amp;nbsp;I&amp;#39;m afraid...perhaps you could attach a sample form to your next post (under the Options tab when you reply) or some screen shots....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For your formula -- make sure you use the &amp;#39;insert field or group&amp;#39; to pick the @ProjectTypeFK field and add the filter. I think you at the very least need to add parenthesis around the first boolean in the first substring (I&amp;#39;m assuming you posted the formula because it is not working correctly?). So:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;concat(substring(&amp;quot;success&amp;quot;, 1, (@ProjectTypeFK[. = 1]) * string-length(&amp;quot;success&amp;quot;)), substring(&amp;quot;undefined&amp;quot;, 1, (not(@ProjectTypeFK[. = 1])) * string-length(&amp;quot;undefined&amp;quot;)))&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/41952.aspx</link><pubDate>Fri, 22 May 2009 09:06:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41952</guid><dc:creator>pablavo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41952.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=41952</wfw:commentRss><description>&lt;p&gt;Hi Hilary, Thanks for replying.&amp;nbsp; Please bare with me :)&lt;/p&gt;
&lt;p&gt;I followed the link and attempted the second approach (see what I did below just to test.)&lt;/p&gt;
&lt;p&gt;I went to default values on the tools menu and added one extra node (so there was two).&amp;nbsp; I went into that node and in one of the fields (field_ID)&amp;nbsp;I added the formula.&amp;nbsp; However, this also added the same formula to the second node which I dont want.&amp;nbsp; This is because there are 7 nodes I need&amp;nbsp;in total (so the user will see 7 sections), and each nodes field_ID&amp;#39;s value&amp;nbsp;will be different depending on 5 possible values from the drop-down list.&amp;nbsp; The technique you suggested changes all the field_IDs to the same value as they now all have the same formula.&amp;nbsp; It would have worked if each node field_ID could have had its own formula.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example, if I create 7 repeating sections of the same&amp;nbsp;database&amp;nbsp;table, and 1 is selected from a drop down list at the top of the form, then the first field_ID of the first repeating section should say 1, the second field_ID of the second repeating section should say 2 and the next one &amp;#39;3&amp;#39; and son on.&amp;nbsp; If 2 is selected from the drop-down, the first node will say 8 and the second will say 9 etc.&lt;/p&gt;
&lt;p&gt;The nodes only seems to have different values if I type in a&amp;nbsp;value and not a forumla in each node.&amp;nbsp; If I type the value 1 to the first node and 2 to the second node field_ID, and view the form, I&amp;#39;ll get different values on each nodes field_ID.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t know if what I&amp;#39;m suggesting is possible.&amp;nbsp; Really hope you can help me a little more.&amp;nbsp; If you don&amp;#39;t think it&amp;#39;s possible, I&amp;#39;d be happy with your opinion as well :)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;concat(substring(&amp;quot;success&amp;quot;, 1, @ProjectTypeFK[. = 1] * string-length(&amp;quot;success&amp;quot;)), substring(&amp;quot;undefined&amp;quot;, 1, (not(@ProjectTypeFK[. = 1])) * string-length(&amp;quot;undefined&amp;quot;)))&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Notes: @ProjectTypeFK is the dropdown list.&amp;nbsp; if one is picked, the nodes field_ID (where the formula has been put) will say success, if not, it will say undefiend&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Manipulating Default Values</title><link>https://www.infopathdev.com:443/forums/thread/41756.aspx</link><pubDate>Fri, 15 May 2009 01:20:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41756</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41756.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=41756</wfw:commentRss><description>&lt;p&gt;Hi -- what about using rules to populate the fields? This would work if the drop down was bound to a field in the same group as the field that you want to change the value on. Otherwise, take a look at &lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;this&lt;/a&gt; InfoPath Team blog post on conditional defaults... it may help. I&amp;#39;ve used the second method mentioned quite frequently, and while it seems really complex when you first read through it, it actually isn&amp;#39;t too bad once you&amp;#39;ve given it a try....&lt;/p&gt;</description></item></channel></rss>