Skip to main content

Hi,


I am trying to populate a field in a Infopath form with the User who creater the form. Once the form is opened it should have the users name populated.


How would I do this? Is there a K2 field that hold this?


Thanks 

If you are starting a K2 process from the InfoPath form, then the process instance isn't created until the Submit button is clicked on. So if you want the user's name in the form when it's first opened, you can't use a K2 field.


If you have SharePoint, you can use the SharePoint User Profile Service, which is a web service that gives you access to all of the SharePoint information about the person who opened the form. There is a great explanation here:


http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx


You could also create an AD SmartObject to access the user information, and combine that with the username() function which is in InfoPath 2007, but that's a little more work.


I hope that helps!


Beth


There is an InfoPath function named username() that will find and display the user that opens the form. Then you can save that value and it'll be found within the InfoPath xml.


Reply