<?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: How to code GetGroupCollectionFromUser during form load</title><link>https://www.infopathdev.com:443/forums/thread/54497.aspx</link><pubDate>Tue, 04 May 2010 15:50:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54497</guid><dc:creator>steveyau</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54497.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54497</wfw:commentRss><description>&lt;p&gt;Can&amp;#39;t I just call the existing web service and pass the current user to it? I already know how to get the current user (me.application.user.loginname) and I&amp;#39;ve figured out which web service (GetGroupCollectionFromUser)&amp;nbsp;I need. But my point is how to make a call in form loading event.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks in advance &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Steve&lt;/p&gt;</description></item><item><title>Re: How to code GetGroupCollectionFromUser during form load</title><link>https://www.infopathdev.com:443/forums/thread/54484.aspx</link><pubDate>Tue, 04 May 2010 10:09:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54484</guid><dc:creator>Prasad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54484.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54484</wfw:commentRss><description>&lt;p&gt;Create&amp;nbsp;your web&amp;nbsp;service object &amp;nbsp;and call the method by passing the current user. To get the current user use the following code:&lt;/p&gt;
&lt;p&gt;SPWeb HRFormsWeb = SPContext.Current.Site.OpenWeb();&lt;br /&gt;SPUser objSubmitter = HRFormsWeb.CurrentUser;&lt;/p&gt;</description></item><item><title>How to code GetGroupCollectionFromUser during form load</title><link>https://www.infopathdev.com:443/forums/thread/54483.aspx</link><pubDate>Tue, 04 May 2010 09:37:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54483</guid><dc:creator>steveyau</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54483.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54483</wfw:commentRss><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m developing a InfoPath 2007 browser form running on MOSS 2007 with form service. When loading a form, I&amp;nbsp;would like to know which SharePoint groups that the current login user belongs to.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I tested the &amp;quot;GetGroupCollectionFromUser&amp;quot; web service from UserGroup.asmx. This is exactly the WS I need. So I created a secondary data connection for this method.&lt;/p&gt;
&lt;p&gt;Now, my question is on &amp;quot;FormEvents_Loading&amp;quot; module, how can I pass Me.Application.User.LoginName to this secondary data connection, let it execute and then return the result to my code,&lt;/p&gt;
&lt;p&gt;Thanks in advance for your kind help&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;</description></item></channel></rss>