<?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: Passing User Roles from Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/16266.aspx</link><pubDate>Tue, 13 Jun 2006 04:39:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16266</guid><dc:creator>infopathdude</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16266</wfw:commentRss><description>I found sol to my own question so figured I will be helpful to others.&lt;br /&gt;What I did was addded a hidden text box to my infopath form which will store the userrole vals,so everytime infopath form loads it will check the val in the textbox and load the particulat view.&lt;br /&gt;Created a new aspx page and used the webservice to grab the xml from the database for the form.&lt;br /&gt;Next created an empty page and used the following code to run the infopath.exe from .Net&lt;br /&gt;Context.Response.ContentType = "application/ms-infopath.xml";&lt;br /&gt;Context.Response.AddHeader("content-disposition", "attachment; give_your_infopath_document_a_cool_name_here.xml");&lt;br /&gt;Context.Response.BinaryWrite( Encoding.UTF8.GetBytes (yourInfoPathDocumentAsXmlStringGoesHere));&lt;br /&gt;Context.Response.End();&lt;br /&gt;This aspx page had one query parameter (smartly used query parameter to get around the whole http handler issue)&lt;br /&gt;This query param being passed to the page is user role what it does is it will take the infopath xml and remove the xml node for userrole textbox and add a new xml(which is supposed to be for textbox in infopath) to the existing one with new userrole value.&lt;br /&gt;On infopath side on OnLoad event infopath will look at the textbox value and open the passed view depending on the userrole.&lt;br /&gt;Do you think it makes sense?&lt;br /&gt;</description></item><item><title>Passing User Roles from Sharepoint</title><link>https://www.infopathdev.com:443/forums/thread/15417.aspx</link><pubDate>Fri, 02 Jun 2006 06:27:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15417</guid><dc:creator>infopathdude</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15417.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15417</wfw:commentRss><description>Hello Experts,&lt;br /&gt;&lt;b&gt;I presume this is one of the frequently asked questions.&lt;/b&gt;&lt;br /&gt;I have a userform, once submitted by the end user alerts the reviewer to review it on sharpoint.I have a web part which will link the reviewer to the form , this form is retrieved by calling a webservice .&lt;br /&gt;Everythings working great so far, only problem I am struck with is &lt;br /&gt;I have two views designed for this userform (userview and reviewerview)&lt;br /&gt;And as per one of the experts recommendation I am switching the view to default view on page load event, thats working great too :)&lt;br /&gt;Now what I am trying to accomplish is when the reviewer clicks on the link I want to pass his userrole as a parameter to the webservice and when the form opens it should accept this userrole parameter in OnLoad event and switch his view.&lt;br /&gt;I have seen Collins article which explains abt passing params which uses merge form logic but here I dont want to have any user interaction,just wanna automate the process.&lt;br /&gt;Please give me some pointers if u have any suggestions.&lt;br /&gt;Appreciate your help in advance.</description></item></channel></rss>