Get logon user information in InfoPath.

P

puvat

I am looking for a function or vbscript code sample to get and store
domain\username in an Infopath form field. The form is created from a
template in Sharepoint Services, and all users are authenticated in SS
using domain\username.

Thanks in advance

Anna
 
P

Patrick Halstead [InfoPath MVP]

Hi Anna,
You can use Environment.Username to get username. Getting Domain, however,
will require special Environment permissions (if you are using .NET). I
would suggest using an Active Directory Web service to get the data. Here's
an example of one (ours) that will do what you need:
http://www.infopathdev.com/webstore/detail.aspx?itemid=18
Regards,
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top