<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Refreshing an existing form when opened via Sharepoint List</title><link>https://www.infopathdev.com:443/forums/thread/65111.aspx</link><pubDate>Fri, 11 Mar 2011 20:01:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65111</guid><dc:creator>corybooth</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65111.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=65111</wfw:commentRss><description>&lt;p&gt;OK figured this out....&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; I had a webmethod that returned / queried results by ID (the PK for the form)&lt;/p&gt;
&lt;p&gt;So when the Data connection was made, the form had a Required check for both the Data Fields AND the query fields.&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp; I changed things around.&amp;nbsp; I gave the form an new ID field - string type.&lt;br /&gt;I made this field equal to concat &amp;quot;ID - &amp;quot;, now()&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp; I then made the webservice query by this new ID.&lt;/p&gt;
&lt;p&gt;4. I made the form rule - check ID when opened, if ID &amp;lt;&amp;gt; blank then insert the ID into the query field and then run a query webservice.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Refreshing an existing form when opened via Sharepoint List</title><link>https://www.infopathdev.com:443/forums/thread/65097.aspx</link><pubDate>Fri, 11 Mar 2011 14:51:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65097</guid><dc:creator>corybooth</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65097.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=65097</wfw:commentRss><description>&lt;p&gt;OK so I tried some other approaches...&amp;nbsp; And now I am curious..&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; I tried to do this, send my form back as normal to the WebService.&lt;br /&gt;2.&amp;nbsp; Set the opened form&amp;#39;s default vaule for the ID = to a Secondary Data Connection return of Max(ID) (understanding if this is ran immediately after the Send to WebService - the chanes of a wrong ID would be very slim)....&lt;/p&gt;
&lt;p&gt;So the though was, user submits which goes to webservice.&lt;br /&gt;Query runs to get the highest ID which would be the form the user just submitted.&lt;br /&gt;Form now gets the ID updated to the proper ID.&lt;br /&gt;Form is saved to SharePoint and can now be linked.&lt;/p&gt;
&lt;p&gt;Problem....&lt;/p&gt;
&lt;p&gt;Trying to set the ID on the Form results in (&amp;quot;Only Integers Allowed&amp;quot;) eh?&amp;nbsp; It is an integer (I even has an IsNull(Max(ID),0) )&lt;br /&gt;So I decided to set a &amp;quot;TempID&amp;quot; field which was &amp;quot;WholeNumber&amp;quot; = to this returned ID - then set the Form ID = to the TempID.&amp;nbsp; No Good.&lt;br /&gt;What&amp;#39;s that about?&lt;/p&gt;
&lt;p&gt;Ok, so I filp the script...&lt;/p&gt;
&lt;p&gt;I set all my ID&amp;#39;s on SQL to uniquenumber.&lt;br /&gt;I do a similar function on SQL to return a newid() which is a GUID.&lt;/p&gt;
&lt;p&gt;I now place that return in the GUID formated ID box.&lt;br /&gt;Won&amp;#39;t accept it?&amp;nbsp; Why not?&amp;nbsp; Error = &amp;quot;Specific Pattern&amp;quot;&amp;nbsp; But the pattern in the box is 8-4-4-12 - a true GUID....&lt;/p&gt;
&lt;p&gt;So is there some type of problem setting a PK on a Form?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Refreshing an existing form when opened via Sharepoint List</title><link>https://www.infopathdev.com:443/forums/thread/65092.aspx</link><pubDate>Fri, 11 Mar 2011 13:03:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65092</guid><dc:creator>corybooth</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65092.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=65092</wfw:commentRss><description>&lt;p&gt;I am using IP2007 and SP2007.&lt;/p&gt;
&lt;p&gt;I have a complicated form that I have managed to get deployed as Browser Enabled via Form Services.&lt;/p&gt;
&lt;p&gt;The backend database is SQL Server using a WebService connection to send and receive data.&lt;/p&gt;
&lt;p&gt;The webserver currently has one &amp;quot;open&amp;quot; method to return data based on the FormID - which is an AutoNumber column in SQL Server.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Perhaps I did this wrong in my WebService, but I have a new form open up with a hidden default value for the FormID as 0.&lt;br /&gt;When the form is saved to the WebService, the code checks if the incoming FormID is 0, if so, it &amp;quot;Inserts&amp;quot; a new row - if not, it &amp;quot;updates&amp;quot; based on the &amp;quot;none 0&amp;quot; FormID.&lt;/p&gt;
&lt;p&gt;This works fine... Until I have a user want to update an existing form and they open it via SharePoint.&lt;/p&gt;
&lt;p&gt;What I guess is happening is that sharepoint stores whatever was initially submitted - which means all the ID&amp;#39;s on the form will be 0 since that is the default value.&lt;br /&gt;Those values wouldn&amp;#39;t actually change until the data hits the database - so a new form wouldn&amp;#39;t know what values go there in the first place.&lt;/p&gt;
&lt;p&gt;I have tried some of the following ideas.&lt;/p&gt;
&lt;p&gt;On the Submit button, Save the form to SQL first, Requery, then Save the form to Sharepoint.&lt;/p&gt;
&lt;p&gt;I have tried to employ a rule that when the form is opened, it requery&amp;#39;s the WebService connection - but without a proper ID - the form is locked up.&lt;/p&gt;
&lt;p&gt;So the question is....&lt;/p&gt;
&lt;p&gt;When using an autonumber (or any other PK) from SQL Server, how do I get those SQL assigned PK&amp;#39;s updated on a from when it is opened from a SharePoint list?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Edit...&amp;nbsp; What I would like to do is have a Link that opens the form and it uses the WebService to retrieve the data - instead of opening the form XML that was saved to the SharePoint list.&lt;br /&gt;But how do you do this?&amp;nbsp; Something like &lt;a href="http://mysite.com/_layouts/FormServices.aspx?blahblah"&gt;http://mysite.com/_layouts/FormServices.aspx?blahblah&lt;/a&gt;....&amp;nbsp; ?FormID=46 - not sure how this would work.&lt;/p&gt;</description></item></channel></rss>