<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Setting the values of Nodes to nonstring values</title><link>https://www.infopathdev.com:443/forums/thread/23357.aspx</link><pubDate>Mon, 01 Oct 2007 13:08:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23357</guid><dc:creator>MStevens</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23357.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23357</wfw:commentRss><description>&lt;p&gt;Thanks for the advice Clay, that takes care of all of my problems and is only 100 to 150 times easier than what I was doing.&lt;/p&gt;</description></item><item><title>Re: Setting the values of Nodes to nonstring values</title><link>https://www.infopathdev.com:443/forums/thread/23350.aspx</link><pubDate>Fri, 28 Sep 2007 20:26:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23350</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23350.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23350</wfw:commentRss><description>&lt;p&gt;If you have set up a data connection and have both the source and target data fields&amp;nbsp;in your data sources then you just need some rules.&lt;/p&gt;
&lt;p&gt;Instead of selecting edit form code, select the rules button.&lt;/p&gt;
&lt;p&gt;From there you can add rules with conditions and actions.&lt;/p&gt;
&lt;p&gt;I am guessing you would&amp;nbsp;add several actions which set a fields value.&amp;nbsp; Then you put the target field and the source in so that when the button is clicked and the conditions are met the actions are fired.&amp;nbsp; (If you do not enter a condition it will happen every time.)&amp;nbsp; A bit simpler than coding.&lt;/p&gt;</description></item><item><title>Re: Setting the values of Nodes to nonstring values</title><link>https://www.infopathdev.com:443/forums/thread/23349.aspx</link><pubDate>Fri, 28 Sep 2007 20:14:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23349</guid><dc:creator>MStevens</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23349.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23349</wfw:commentRss><description>&lt;p&gt;Well... I only have three options for the button which is Rules and custom code, submit, and refresh.&amp;nbsp; Neither submit nor refresh took care of the functionality that I needed, so I chose the rules and custom code option and set about implementing custom code using C# as my language of choice.&lt;/p&gt;
&lt;p&gt;What I&amp;#39;ve done is set up each of the webservice methods as data&amp;nbsp;sources and then used the XPathNavgator to push values in and extract values from the data sources... I&amp;#39;m not sure if that&amp;#39;s what you mean by a secondary dom or not.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thank you for the link and I&amp;#39;ll have&amp;nbsp;a look at the sample forms you provided and see if that clears things up for me.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Setting the values of Nodes to nonstring values</title><link>https://www.infopathdev.com:443/forums/thread/23345.aspx</link><pubDate>Fri, 28 Sep 2007 19:23:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23345</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23345.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23345</wfw:commentRss><description>&lt;p&gt;Why did you choose to do this with c# code when it can be done within InfoPath?&lt;/p&gt;
&lt;p&gt;Typically we at least setup the data connection and load the data from the web service into a secondary dom.&amp;nbsp; Then use code or rules to move the data within the form.&lt;/p&gt;
&lt;p&gt;We have some sample forms included in the Database Accelerator download. &lt;a href="http://www.infopathdev.com/files/folders/dbxldownload/entry22386.aspx" target="_blank"&gt;Qdabra Database Accelerator Suite Version 2.1.2815 - Developer&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Setting the values of Nodes to nonstring values</title><link>https://www.infopathdev.com:443/forums/thread/23344.aspx</link><pubDate>Fri, 28 Sep 2007 18:46:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23344</guid><dc:creator>MStevens</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23344.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23344</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve been writing custom code (C#) &amp;nbsp;for a button in InfoPath 2007 that queries a webservice to return a dataset and then updates several fields on the form with values from said dataset.&amp;nbsp; The functionality is basically so people can fill out a form and submit it and&amp;nbsp;look up the data in the form and change values as need be.&amp;nbsp; Right now I&amp;#39;ve no issues with setting the values of drop down lists, or text boxes as long as the values are strings.... but I&amp;#39;ve also got a few checkboxes and Date picker.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;d like to be able to be able to programatically set values of nodes whether they are strings, ints, bools,&amp;nbsp;or Date/time objects and haven&amp;#39;t been able to find a method for this.&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;The method I&amp;#39;m using for setting values is to assign the node using the XPathNavigator to get the node then using the SetValue function to change the value.&amp;nbsp; Unfortunatley the SetValue function only accepts string arguements, and will blow up&amp;nbsp;the form if you set that value to a textbox that has been assigned a datatype of integer, or decimal.&amp;nbsp; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;I&amp;#39;m certain that if I can figure out this snag, figuring out how to set the values on the date pickers, and the check boxes will be no issue.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Thanks&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>