I have a Info path 2010 Form with the below mentioned fields This form is used for Approval Request and the the users will create the Approval Request for them or on Behalf on someone .
For example A project Manager will create a Approval Request for someone else.
1.On Behalf Of Requester [This filed will be populated when a Program manager fills the Approval Request for some other person]
2.Requester[user who creates the particular list item for him.In this case the On Behalf Of Requester is empty]
3.Level 1 Manager
4.Level 2 Manager
5.Level 3 Manager
Currently i am getting the User Name using substring-after(userName(), "i:0#.w|DomainName\") which prints the current User Id without Domain name.
When the Requester field is not null i am getting the Account Id of the Person who created the Approval Request using the below formula.
substring-after(eval(eval(Requestor, 'concat(../my:Requestor/pc:Person/pc:AaccountId, "")'), ".."), "i:0#.w|Domain name\")
I want to populate the Requester field using a condition.
IF On Behalf Of Requester is not empty then On Behalf Of Requester ELSE the userName() of the person who is creating the list item.
Please let me know hot to achieve this.
http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx
http://www.infopathdev.com/forums/p/7124/93123.aspx