<?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: Field value determined by external data source</title><link>https://www.infopathdev.com:443/forums/thread/80793.aspx</link><pubDate>Thu, 19 Jul 2012 21:05:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80793</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80793.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=80793</wfw:commentRss><description>&lt;p&gt;You want this:&lt;/p&gt;
&lt;p&gt;xdXDocument:GetDOM(&amp;quot;STATES&amp;quot;)/items/item/value[../name = xdXDocument:get-DOM()/my:myFields/my:State]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Field value determined by external data source</title><link>https://www.infopathdev.com:443/forums/thread/80792.aspx</link><pubDate>Thu, 19 Jul 2012 21:00:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80792</guid><dc:creator>ebonymb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80792.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=80792</wfw:commentRss><description>&lt;p&gt;Okay, now I&amp;#39;ve made a little progress.&amp;nbsp; I was able to resolve the error by editing the xpath &lt;/p&gt;
&lt;p&gt;&amp;nbsp;xdXDocument:GetDOM(&amp;quot;STATES&amp;quot;)/items/item/value[xdXDocument:GetDOM(&amp;quot;STATES&amp;quot;)/items/item/name = xdXDocument:get-DOM()/my:myFields/my:State]&lt;/p&gt;
&lt;p&gt;Now, the only problem is when I select different states, the GL value stays the same.&lt;/p&gt;</description></item><item><title>Re: Field value determined by external data source</title><link>https://www.infopathdev.com:443/forums/thread/80791.aspx</link><pubDate>Thu, 19 Jul 2012 20:35:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80791</guid><dc:creator>ebonymb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80791.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=80791</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m only able to get this to work halfway.&amp;nbsp; In my form, the formula for field name &amp;quot;GL&amp;quot;&amp;nbsp; is value[name = State].&amp;nbsp; This is according to your example.&amp;nbsp; For some reason, it keeps erroring out because &amp;quot;State&amp;quot; is not a filter in the resource file.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;External datasource has filgers name and value.&amp;nbsp; the drop down list works perfectly.&amp;nbsp; in your example, field1 is not in the resource file so not sure why yours works and mine does not.&amp;nbsp; Any ideas?&lt;/p&gt;</description></item><item><title>Re: Field value determined by external data source</title><link>https://www.infopathdev.com:443/forums/thread/80787.aspx</link><pubDate>Thu, 19 Jul 2012 19:20:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80787</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80787.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=80787</wfw:commentRss><description>&lt;p&gt;You could modify your XML file to include the correct number for each state and use a default value for GL. I&amp;#39;ve attached a simple sample - save it locally and then you right click the file to open in design mode and preview it. Under Data --&amp;gt; Resource Files you can export the XML (if IP 2007, Tools --&amp;gt; Resource Files) so you can see how I set mine up. Right click the text box on the form and select Properties to see the formula I used for the default value.&lt;/p&gt;</description></item><item><title>Field value determined by external data source</title><link>https://www.infopathdev.com:443/forums/thread/80786.aspx</link><pubDate>Thu, 19 Jul 2012 19:06:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80786</guid><dc:creator>ebonymb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80786.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=80786</wfw:commentRss><description>&lt;p&gt;I have created drop down field &amp;quot;STATE&amp;quot; which is populated by an xml data source showing all 50 states, per the following example:&lt;/p&gt;
&lt;p&gt;&amp;lt;items&amp;gt;&lt;br /&gt;&amp;lt;item&amp;gt;Arizona&amp;lt;/item&amp;gt;&lt;br /&gt;&amp;lt;item&amp;gt;Arkansas&amp;lt;/item&amp;gt;&lt;br /&gt;&amp;lt;item&amp;gt;California&amp;lt;/item&amp;gt;&lt;br /&gt;&amp;lt;/items&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I would like text box field &amp;quot;GL&amp;quot; to display the related numerical IDs based on the selection in &amp;quot;STATE&amp;quot;.&amp;nbsp; For example, If user chooses California in State, GL&amp;nbsp;value is&amp;nbsp;382.&amp;nbsp; If user chooses Washingion, GL value is 145.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I know I could set the value using rules but not sure how to write the formla.&amp;nbsp; Any ideas?&lt;/p&gt;</description></item></channel></rss>