<?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: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/19810.aspx</link><pubDate>Mon, 14 May 2007 06:09:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19810</guid><dc:creator>liorlankril</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19810.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=19810</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What should I write instand of Enviermanr.UserName if my form&amp;#39;s code is simplae vbscript (no c# or VB.NET)????&lt;/p&gt;</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2267.aspx</link><pubDate>Mon, 22 May 2006 21:17:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2267</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2267.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2267</wfw:commentRss><description>This is actually a limitation when working with managed code.&lt;br /&gt;&lt;br /&gt;Try this: make a button in the form that calls this code:&lt;br /&gt;&lt;br /&gt;thisXDocument.UI.Alert( Environment.UserName );&lt;br /&gt;&lt;br /&gt;and you will be able to see the error that InfoPath emits.  We have talked about this and have not found a workaround.</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2266.aspx</link><pubDate>Mon, 22 May 2006 15:38:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2266</guid><dc:creator>Chloe</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2266</wfw:commentRss><description>I'm doing the same thing, using C# code to populate a text box with the user id.  I get the user id when I preview the form, but when I publish the form to a Shrepoint form library it doesn't populate the user id.  I don't get any security warnings or errors, and I'm not sure what I need to do to get it to work.</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2265.aspx</link><pubDate>Mon, 24 Apr 2006 04:42:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2265</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2265.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2265</wfw:commentRss><description>In C# and VB.net is Environment.UserName.</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2264.aspx</link><pubDate>Mon, 24 Apr 2006 04:13:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2264</guid><dc:creator>gaurs</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2264.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2264</wfw:commentRss><description>I just need the userid. Through the code, Can I use Environment.UserName or Context.User.Identity.Name?</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2263.aspx</link><pubDate>Sat, 22 Apr 2006 23:01:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2263</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2263</wfw:commentRss><description>Oh, yeah, I forgot The Active Directory Web service on our website.  It is the first option mentioned by Philip in his suggestions (see above link) and I quote "1. Get the InfoPath form to query Active Directory so that it can extract the user's name based on the account name you get from Environment.UserName."  As Patrick said in his reply, it will allow you to prepopulate the username without writing any code.  :-)&lt;br /&gt;</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2262.aspx</link><pubDate>Sat, 22 Apr 2006 22:06:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2262</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2262.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2262</wfw:commentRss><description>Hi Gaurs,&lt;br /&gt;We created the Active Directory Web service (see Downloads) to solve you problem. You have to install it on a server on you network , but it will allow you to prepopulate the username without writing any code. You can get the user's logged-in alias if you use code, but there is no way to get the actual user's name without calling Active Directory (which is what our Web service does). It's only ~$20 and it is one of our most popular downloads. If you have any questions, please see the Premium Downloads forum where there are several good posts on how to use the Web service. It also comes with instructions on how to setup and use. &lt;br /&gt;&lt;br /&gt;Cheers!</description></item><item><title>Re: How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/2261.aspx</link><pubDate>Sat, 22 Apr 2006 16:01:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2261</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2261.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2261</wfw:commentRss><description>Not sure if you can do this within the form without code.  Here is a thread to get you started:&lt;br /&lt;a target="_blank" href=http://www.mcse.ms/archive180-2005-7-1727393.html&gt;http://www.mcse.ms/archive180-2005-7-1727393.html&lt;/a&gt;</description></item><item><title>How to pre-populate user id</title><link>https://www.infopathdev.com:443/forums/thread/1263.aspx</link><pubDate>Sat, 22 Apr 2006 10:30:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1263</guid><dc:creator>gaurs</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1263</wfw:commentRss><description>I need to pre-populate the user id when he open the form. How can I do this without code?</description></item></channel></rss>