<?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: Script from listbox</title><link>https://www.infopathdev.com:443/forums/thread/13501.aspx</link><pubDate>Sun, 28 Aug 2005 23:16:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13501</guid><dc:creator>Mik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13501.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13501</wfw:commentRss><description>Forget that, it was the DB peoples problem. &lt;br /&gt;Ive got to remember to check that a query returns a value before I try to implement it.</description></item><item><title>Re: Script from listbox</title><link>https://www.infopathdev.com:443/forums/thread/13500.aspx</link><pubDate>Fri, 26 Aug 2005 03:00:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13500</guid><dc:creator>Mik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13500.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13500</wfw:commentRss><description>That helped alot thanks, I used the OnAfterChange.. my problem now is that the variable used in the first list box isnt being written to a node (its populated by a secondary data source) before the script is run.. i think.&lt;br /&gt;This means that the variable I am putting into the query, that is in a field in my form, is empty and thus returning sql errors.&lt;br /&gt;&lt;br /&gt;Any thoughts?</description></item><item><title>Re: Script from listbox</title><link>https://www.infopathdev.com:443/forums/thread/13499.aspx</link><pubDate>Thu, 25 Aug 2005 10:29:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13499</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13499.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13499</wfw:commentRss><description>Hi Mik,&lt;br /&gt;Did you try onAfterChange Method? &lt;br /&gt;You can write code in onAfterChange method.&lt;br /&gt;&lt;br /&gt;One more thing you can have conditions on a rule when to execute and not execute. In this conditions you can call a script method also using "xdExtension".&lt;br /&gt;&lt;br /&gt;For further info on "xdExtension" do a search in the site.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Script from listbox</title><link>https://www.infopathdev.com:443/forums/thread/12537.aspx</link><pubDate>Thu, 25 Aug 2005 03:27:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12537</guid><dc:creator>Mik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12537</wfw:commentRss><description>I need script to execute once a listbox entry has been selected, but you cannot set script execution in a rule.&lt;br /&gt;&lt;br /&gt;I have worked out how to do a conditional sql query using the default data connections string, that all works fine. The data connection is used to populate a list box, in which the contents will populate furthur listboxes. I can set a rule to query a database, but i cannot set that query to be conditional on the first list box. I could connect to the entire table and then filter what i need, but there will be over 1000 rows, and some slow remote sites which will use the form.&lt;br /&gt;&lt;br /&gt;In practice, the list box that i have populated represents a manager, and the second list box will be their subordinates.&lt;br /&gt;&lt;br /&gt;But back to the question.. how do you map script to a list box selection? (or set a default sql query to conditional on a field)</description></item></channel></rss>