Kudos to David Gerhardt for covering a scenario around userName in-depth in his blog article: http://blogs.3sharp.com/Blog/davidg/archive/2006/11/14/2380.aspx
I have my Infopath 2007 form published to a Sharepoint server and it has been granted domain trust, but still a text-box with default value userName() shows up blank. Am I doing anything wrong?
I have my InfoPath 2007 form published to a Sharepoint server with FULL TRUST and keep getting 'system' returned by userName() function. Is there any way to overcome that?
i was trying to make a form with a field that contain Employee name i found the best way to do so is
PingBack from http://copyrightrenewalsblog.info/infopath-team-blog-goodbye-whoami-hello-username/
I am trying to develop an application using infopath 2003.
but i cant find the above Username() field in my insert function box, is the any other pre-settings to be done?
As per the information at the beginning of this post, the "userName()" function is new to InfoPath 2007 - as such, you will not find this in InfoPath 2003.
Now, if you stated you were using InfoPath "2003" in error, then this function is available in the UI. Here is a sample for finding the function:
- Add a button to your View
- Add a Rule to the Button
- Add an Action to the Rule as follows:
- Action: Set a field'a value
- Field: Select the field where you want to set the user
- Value: Click the "fx" button
- Click Insert Function
- Select "All" in the Categories list
- Scroll to the bottom of the Functions list and you will see "userName"
I have a question about using this function. It works find when the form loads. I however am trying to get the function to recalculate after the same form is opened again later. How does this work? Pease point me in the right direction. Thanks.
I am having what seems to be the same issue that by email@example.com posts about and I am wondering if anyone has a solution.
More specifically, I am trying to get the userName()
function to recalculate after the same form is opened by another person. The reason this is important in this effort is that we want to use the response to determine user role so that we can do dynamic view switching in InfoPath.
Even more specifically - This InfoPath form is expected to be opened, filled out, or later edited using a browser through SharePoint 2007 form Services.
Any responses would be appreciated. TIA
I have a problem in this case. I have Used This method but I want that every time someone open the form, it get the new username dynamically. but the form always save the first username it has got. help me please
When using the "userName" function in the default value property as described here, this only changes (i.e. sets the property) when it is blank. If you need to get the user name each time the form is opened, you will need to do these steps:
1) Remove the "userName" function from the default value property of your text box control
2) From the Tools menu choose Form Options
- Select the Open and Save category
- Click the Rules button
- Click Add
- Click Add Action
- From the "Action" dropdown box choose "Set a field's value"
- Click the button next to the "Field" box and select the data source node where you previously had the "userName" function set as the default value
- Click the "fx" button next to Value, click Insert Function and insert the "userName" function
What this will now do is fire the "userName" function and set your node each time the form is opened.
Goodbye userName()! Hello WhoAmI? *cry*
The link at the top of the blog to the WhoAmI web service (tutorial I assume?) is dead.
Instead of installing Infopath 2007 on everyone's computers just to allow me to use the userName() function, I wanted to look into using the WhoAmI codeless method for Infopath 2003 (which everyone has installed). The problem is I cant find any good tutorials as to how to set it up.
Any links or help is much apprieciated.
Take a look at this MSDN article as it has the "WhoAmI" web service in there...it's pretty easy to setup:
HTTP Security and ASP.NET Web Services
Thank you Scott I''ll give it a shot.
How can i change the view based on user group, I have three groups User,Team member and manager and three forms based on their requirements.