<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: XPath expression for autopopulating fields (DB connection)</title><link>https://www.infopathdev.com:443/forums/thread/33487.aspx</link><pubDate>Fri, 24 Oct 2008 10:54:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33487</guid><dc:creator>Talax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33487.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33487</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Shiva,&lt;/p&gt;&lt;p&gt;&amp;nbsp;now I have to thank you very very very much. Your advice led to success. Especially the sixth step was fundamental for my task. It realy will make our work easer.&lt;/p&gt;&lt;p&gt;Thank you one more time.. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: XPath expression for autopopulating fields (DB connection)</title><link>https://www.infopathdev.com:443/forums/thread/33411.aspx</link><pubDate>Thu, 23 Oct 2008 11:04:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33411</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33411.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33411</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Here are the steps to set a field value,&lt;/p&gt;
&lt;p&gt;1. Click on &amp;quot;fx&amp;quot; icon in Action window.&lt;/p&gt;
&lt;p&gt;2. Click on &amp;quot;Insert Field or Group&amp;quot; button in Insert Formula window.&lt;/p&gt;
&lt;p&gt;3. Select secondary data source setting value and click on ‘Filter Data&amp;#39; button.&lt;/p&gt;
&lt;p&gt;4. Click on ‘Add&amp;#39; button in Filter Data window.&lt;/p&gt;
&lt;p&gt;5. Select filter condition field in left side dropdown and second drop down value should be ‘equal to&amp;#39;.&lt;/p&gt;
&lt;p&gt;6. In third drop down select main data source selected node (filter on this field).&lt;/p&gt;
&lt;p&gt;Click on ‘OK&amp;#39; seven times&lt;/p&gt;</description></item><item><title>Re: XPath expression for autopopulating fields (DB connection)</title><link>https://www.infopathdev.com:443/forums/thread/33406.aspx</link><pubDate>Thu, 23 Oct 2008 08:46:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33406</guid><dc:creator>Talax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33406.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33406</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello Shiva,&lt;br /&gt;&lt;br /&gt;At first thank you for your answer.. What I would like to find out is how to apply the rule on drop-down list box. &lt;br /&gt;&lt;br /&gt;A have two connections to the two different tables in one DB (difference is only in tehir name) &amp;quot;Customer_Inf&amp;quot; has main connection and &amp;quot;Customer&amp;quot; secondary - they have exactly same atributes (columns). In Customer I want to find the data using atribute PersonalNumber in drop-down list box and autofil the rest of columns from the Costumer. Then these data upload to the Customer_Inf. What I have achieved till now is only upload PersonalNumber.&lt;br /&gt;&lt;br /&gt;My problem is that I don&amp;#39;t know how to write the xPath formula. In drop-down list box properties/Rules/Add/Add action/Set a field&amp;#39;s value/Value:&lt;br /&gt;&lt;br /&gt;for example I tried something like this: &lt;br /&gt;&lt;br /&gt;FIELD&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE&lt;br /&gt;../@Firstname=../@FirstName[../@PersonalNumber = current()]&lt;/p&gt;&lt;p&gt;but it unfortunately didn&amp;#39;t work :(&lt;/p&gt;&lt;p&gt;&amp;nbsp;Tahnk you.. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: XPath expression for autopopulating fields (DB connection)</title><link>https://www.infopathdev.com:443/forums/thread/33393.aspx</link><pubDate>Thu, 23 Oct 2008 04:29:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33393</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33393.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33393</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;While taking the data connection you have to select ‘Database&amp;#39; in the place of XML Document. Then you will get the data from database. &lt;/p&gt;
&lt;p&gt;Your dropdown list box entries should be above database connection and point to the specific node.&lt;/p&gt;
&lt;p&gt;Based on requirement you have to apply your rule to set the value. If you give more details on database schema and main data source schema then we can help you how to set the rule.&lt;/p&gt;
&lt;p&gt;Hope this helps you&lt;/p&gt;</description></item><item><title>XPath expression for autopopulating fields (DB connection)</title><link>https://www.infopathdev.com:443/forums/thread/33370.aspx</link><pubDate>Wed, 22 Oct 2008 15:04:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33370</guid><dc:creator>Talax</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33370.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=33370</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello everyone,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I have a main data connection to the one table, that I want to upload on SQL server. Data that will be uploaded I need to get from the secondary data source. And in this case, I woud like to use autopopulate function like Greg Collins described here &lt;a href="http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85" target="_blank"&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85&lt;/a&gt; But he uses there blank sheet and XML document source. What I would need to know is - how to use this method on a database connection, mainly the part with applying rules on drop-down list box..&lt;/p&gt;&lt;p&gt;&amp;nbsp;I will be verz thankful for any ideas.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>