Get the current user and manager in InfoPath


Badge +2

Have any one tried this? I need to display current user and the manager pre-selected on form load within a drop down so user can also change it? I have already tried this http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx?from=ClayCobb but it doesn't work.


2 replies

Badge +1

Hi,


Set the rule in form open/save.In that rule get the currentuser through UserName() function and assign it for temp datafield then next action pass this value to the GetUserProfileByName method then specify he filter condition DataProperties-->Name is equalto Manager..But in ur Active directory should contains the Manager Name for the corresponding user, otherwise it wont return..
..Thats it.. u can get it...


 

Badge +2

Hi dee,


I created a new rule "currentUser",  in Action I selected "Set a field's value", in field I selected a field from myfields and in the value i typed CurrentUser(), now how do I pass this to GetUserProfileByName? Could you explain it in bit more details pls

Reply