<?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: Any Idea how to accomplish this task?</title><link>https://www.infopathdev.com:443/forums/thread/72940.aspx</link><pubDate>Wed, 14 Dec 2011 18:46:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72940</guid><dc:creator>paulywog</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72940.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=72940</wfw:commentRss><description>&lt;p&gt;For what it is worth, I wanted to mention one approach I tried, which seemed feasible, but I couldn&amp;#39;t get it to work.&lt;/p&gt;
&lt;p&gt;I created a new form, based off a data connection.&amp;nbsp; I&amp;nbsp;added the primary key field onto the query part of the screen, and then&amp;nbsp;added all three fields into the data fields portion of the screen.&amp;nbsp; I created a rule at form opening that did this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Set the primary key equal to the username of the person logged in.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Query the main data source&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Check for the datafields to be non present&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;if the datafields are present, stop processing rules.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;if the datafields are non-present:&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set the data fields to some default values&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Submit the data fields using the main data source&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This seemed like it would at least get me started in the right direction, but instead I get that error &amp;quot;The form does not contain any new data to submit to the data source.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Seems like it would contain data, since I just set the values in the rule. I know the flow is working, because I inserted test records, and then tried again without test data.&lt;/p&gt;
&lt;p&gt;Another question that I have is this. After the query part of the opening rule, the datafields are not present on the screen, because the data returned no rows. Is there no rule that I can use to re-insert the blank row so I can automate the SUBMIT to main connection???&lt;/p&gt;
&lt;p&gt;so confused.&amp;nbsp; Thanks so much for any advice at all.&lt;/p&gt;</description></item><item><title>Any Idea how to accomplish this task?</title><link>https://www.infopathdev.com:443/forums/thread/72922.aspx</link><pubDate>Wed, 14 Dec 2011 03:37:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72922</guid><dc:creator>paulywog</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72922.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=72922</wfw:commentRss><description>&lt;p&gt;I am definitely new to InfoPath, but I am a .Net software developer.&amp;nbsp; What I am finding is that, what I thought would be extremely simple in InfoPath, is turning out to be impossible for someone new to this.&lt;/p&gt;
&lt;p&gt;All I am trying to do is this scenario:&lt;/p&gt;
&lt;p&gt;1. User opens a Form&lt;/p&gt;
&lt;p&gt;2. Form determines if user has a record in a table in the database using their Username (obtained from UserName function)&lt;/p&gt;
&lt;p&gt;2a. If they DO NOT have a record, open a section in INSERTION mode and set some basic default values.&lt;/p&gt;
&lt;p&gt;2b. If they DO have a record, open that record for edit.&lt;/p&gt;
&lt;p&gt;The user can&amp;#39;t have more than one record. The table is created already in SQL Server. The table has 3 columns: User ID, UpdateDate, and YesNo, all are text for simplicity. User ID us unique.&lt;/p&gt;
&lt;p&gt;I have already spent 10 hours trying to use the form and the open rules, view, etc. to do this, and I simply can&amp;#39;t figure it out.&amp;nbsp; If anyone has some basic advice, I would love to hear it.&amp;nbsp; Can you even do this?&amp;nbsp; Do I have to use VB script and crawl through XML for this?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Thanks so much!!&amp;nbsp; I would think this is simple, but I just can&amp;#39;t make any progress.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Paul&lt;/p&gt;</description></item></channel></rss>