<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11890.aspx</link><pubDate>Fri, 25 Aug 2006 17:05:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11890</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11890.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11890</wfw:commentRss><description>You should be able to use filters on a default value formula for a text box. The example I provided above was just what I built in an attempt to provide the steps in my reply.&lt;br /&gt;&lt;br /&gt;Good luck!</description></item><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11889.aspx</link><pubDate>Wed, 23 Aug 2006 17:29:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11889</guid><dc:creator>ckpaulie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11889.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11889</wfw:commentRss><description>Thanks, you understand what I am trying to do.  I would prefer to use a textbox control instead of the drop-down list but your solution is acceptable.  Out of curiosity, if the drop-down and expression box filters work, why won't the textbox control's defualt value?</description></item><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11888.aspx</link><pubDate>Wed, 23 Aug 2006 16:29:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11888</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11888.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11888</wfw:commentRss><description>Okay... Going with the assumption that you have a 2DS (Note this needs to be added as a "Data Connection" and not just a "Resource") as described above, with a root node being &amp;lt;Lines&amp;gt;, and also that your main data source is of a similar structure, only that it can have a single Component...&lt;br /&gt;&lt;br /&gt;Let's say you add a repeating table to your view based on the main dom repeating Line node. That table has two columns. Col1 is a drop-down for LineID and Col2 is a drop-down for Component.&lt;br /&gt;&lt;br /&gt;1. Right-click Col1 drop-down and choose Properties.&lt;br /&gt;2. Select "Look up values in a data connection..."&lt;br /&gt;3. Select the Lines data connection.&lt;br /&gt;4. Select /Lines/Line/LineID as the entries.&lt;br /&gt;5. Click OK.&lt;br /&gt;&lt;br /&gt;Now the Col2 drop-down is set up this way:&lt;br /&gt;&lt;br /&gt;1. Right-click Col1 drop-down and choose Properties.&lt;br /&gt;2. Select "Look up values in a data connection..."&lt;br /&gt;3. Select the Lines data connection.&lt;br /&gt;4. Select /Lines/Line/Component as the entries--AND set a filter.&lt;br /&gt;5. Click Fitler Data, and then click Add.&lt;br /&gt;6. Select PartNumber in the first list.&lt;br /&gt;7. Select Use Formula in the 3rd list and type: current()/my:LineID&lt;br /&gt;8. Click OK 5 times to go back to the view.&lt;br /&gt;&lt;br /&gt;Now Preview.&lt;br /&gt;The first drop-down gives you your list of Line IDs. After selecting one of those, your second list gives you a Filtered list of Component Part Numbers based on the selected Line ID.</description></item><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11887.aspx</link><pubDate>Wed, 23 Aug 2006 01:42:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11887</guid><dc:creator>ckpaulie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11887.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11887</wfw:commentRss><description>It's an XML file included as a resource file in the template.  Here is an snippet of the 2DS (nice acronym) instance:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Line&amp;gt;&lt;br /&gt;  &amp;lt;LineID&amp;gt;Line 1&amp;lt;/LineID&amp;gt;&lt;br /&gt;  &amp;lt;Component&amp;gt;&lt;br /&gt;    &amp;lt;PartNumber&amp;gt;12345&amp;lt;/PartNumber&amp;gt;&lt;br /&gt;    &amp;lt;Default&amp;gt;true&amp;lt;/Default&amp;gt;&lt;br /&gt;  &amp;lt;/Component&amp;gt;&lt;br /&gt;  &amp;lt;Component&amp;gt;&lt;br /&gt;    &amp;lt;PartNumber&amp;gt;abcdef&amp;lt;/PartNumber&amp;gt;&lt;br /&gt;    &amp;lt;Default&amp;gt;false&amp;lt;/Default&amp;gt;&lt;br /&gt;  &amp;lt;/Component&amp;gt;&lt;br /&gt;&amp;lt;/Line&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There can be multiple &amp;lt;Line /&amp;gt; elements within the 2DS and each one corresponds one to one with a &amp;lt;Line /&amp;gt; element in the main data source.  The two schemas are identical with the one difference being that the main data source schema allows only one &amp;lt;Component /&amp;gt; element per &amp;lt;Line /&amp;gt;.&lt;br /&gt;&lt;br /&gt;For each &amp;lt;Line /&amp;gt; element in the main data source, I am trying to set the &amp;lt;PartNumber /&amp;gt; grandchild to a value from the 2DS on form startup.  I verified my xpath by placing an expression box next to the textbox control bound to the &amp;lt;PartNumber /&amp;gt; element.  The textbox control's default value uses the same expression as the expression box.  The expression box returns the correct data but the textbox remains blank.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Chris</description></item><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11886.aspx</link><pubDate>Tue, 22 Aug 2006 23:20:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11886</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11886.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11886</wfw:commentRss><description>Secondary data sources, by their nature, contain their default values within them. For example, if you have a 2DS connected to an XML file, that XML file contains all the default values... these are not set at runtime unless you use rules or code.</description></item><item><title>Re: Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11885.aspx</link><pubDate>Tue, 22 Aug 2006 21:50:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11885</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11885.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11885</wfw:commentRss><description>Hi Chris and welcome to the forums!&lt;br /&gt;&lt;br /&gt;I'm not sure why this isn't working, I've included default values for secondary data sources several times.  What kind of secondary data source is it? An XML Document that is included in the form?</description></item><item><title>Default Values and Secondary Datasources</title><link>https://www.infopathdev.com:443/forums/thread/11712.aspx</link><pubDate>Tue, 22 Aug 2006 20:30:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11712</guid><dc:creator>ckpaulie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11712.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11712</wfw:commentRss><description>I have a field within a secondary datasource that I would like to use as the default value for a field in my form's Main datasource.  I used an expression box to verify my query returns the correct results from the secondary datasource.  I then copied this query into a TextBox control's default value property, but the data is not populated on startup when I preview the form.  Can this be done?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Chris</description></item></channel></rss>