Already Robbie_Leggett: has answered my question . (http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Infopath/Q_24322675.html
Later I went into an issue, If preferred name is having space between Lastname and first name(eq: Robbie Leggett) then its throwing error, saying some rules are not applied.
"The query cannot be run fot the following dataobject: GetUSerProfileByName
Infopath cannot einthe specified query.
The SOAP response indicates that an error occurred:
A user with the account name Robbie Leggett could not be found. --> User Not Found: Could not load profile data from the Database. "
It works for names without space.
what is the workarround for this.