<?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: Simple Syntax Problem for Position()...I Hope!</title><link>https://www.infopathdev.com:443/forums/thread/76494.aspx</link><pubDate>Thu, 15 Mar 2012 03:36:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76494</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76494.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76494</wfw:commentRss><description>&lt;p&gt;Typically position() is used with no arguments, but I think there&amp;#39;s a high likelyhood that it won&amp;#39;t be of any help in this situation, no matter how you use it.&amp;nbsp; Though it will make the formula even uglier, I think Anson&amp;#39;s preceding-sibling:: suggestion is probably the way to go.&lt;/p&gt;</description></item><item><title>Re: Simple Syntax Problem for Position()...I Hope!</title><link>https://www.infopathdev.com:443/forums/thread/76457.aspx</link><pubDate>Wed, 14 Mar 2012 19:21:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76457</guid><dc:creator>Anson Hidajat</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76457.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76457</wfw:commentRss><description>Have you tried using preceding sibling?&amp;nbsp; Here is a blog post that may help: &lt;a href="http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Using-XPath_2700_s-_2700_preceding_2D00_sibling_2700_-Axis-Correctly.aspx"&gt;http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Using-XPath_2700_s-_2700_preceding_2D00_sibling_2700_-Axis-Correctly.aspx&lt;/a&gt;</description></item><item><title>Simple Syntax Problem for Position()...I Hope!</title><link>https://www.infopathdev.com:443/forums/thread/76436.aspx</link><pubDate>Wed, 14 Mar 2012 16:07:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:76436</guid><dc:creator>nkstrou</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/76436.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=76436</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to create a Default Value for a textbox that is in a repeating table.&amp;nbsp; Since you can&amp;#39;t&amp;nbsp;set up an&amp;nbsp;if-then-else structure for Default Value, I did some research and&amp;nbsp;found this &lt;a title="article" href="http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx?PageIndex=2#comments" target="_blank"&gt;article&lt;/a&gt;, which in Method 2 references a nasty concat(substring()) thing that I think might do what I need.&amp;nbsp;&amp;nbsp;Thing is,&amp;nbsp;the condition I need to evaluate as true or false is the row number of my textbox, and I&amp;#39;m having some trouble building the correct syntax.&amp;nbsp; The function help says that the syntax for position is &lt;strong&gt;&lt;u&gt;position(field)&lt;/u&gt;&lt;/strong&gt; and everywhere else in Default Value I can use &amp;quot;.&amp;quot; (without quotes) to denote the current field, yet when I put (position(.) &amp;lt; 9) for the true condition on my first substring, it says that position(.) contains an invalid number of arguments.&amp;nbsp; Hunhhh???&amp;nbsp; I also tried (.[position() &amp;lt; 9) and got a different error, but I think that the []s indicate filter syntax, which is not what I need here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Better yet, when I try to Google examples of position() syntax, I don&amp;#39;t find much.&lt;/p&gt;
&lt;p&gt;Do any of you who know IP and XPath better than this poor clueless newbie know the correct syntax for what I&amp;#39;m trying to do?&amp;nbsp; If it helps any, the overall string I&amp;#39;m trying to build is concat(substring(&amp;quot;Incident&amp;quot;, 1, (position(.) &amp;lt; 9) * string-length(&amp;quot;Incident&amp;quot;)), substring(&amp;quot;Change&amp;quot;, 1, (position(.) &amp;gt; 8 and position(.) &amp;lt; 12) *string-length(&amp;quot;Change&amp;quot;)), substring(&amp;quot;Problem&amp;quot;, 1, (position(.) = 12) * string-length(&amp;quot;Problem&amp;quot;)), substring(&amp;quot;Any&amp;quot;, 1, (position(.) = 13) * string-length(&amp;quot;Any&amp;quot;)))&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;nkstrou&lt;/p&gt;</description></item></channel></rss>