Windows authentication in infopath?

V

V.A.

Developers,

At the company I work, we use sharepoint services for our intranet. I
designed a form in InfoPath to gather the Time Card and store it in a SQL
database. I was wondering if there is a way to store the person's name who
log on the sharepoint services. Our sharepoint uses windows authentication.
So this way I'll make sure that everyoen fills out their own timecards.

When a user logs on to any computer, sharepoint will be display on the
desktop.

Thanks.
 
V

V.A.

Thanks for the reply,
I've added this piece of code to InfoPath form, but I've got an error message
---error message---

InfoPath cannot open the selected form because of an error in the form's code.
The following error occurred:

Expected ';'
File:script.js
Line:27
IXMLDOMNode nodeEmployee =


-----code-------
// store an XMLDOM node as a local variable
IXMLDOMNode nodeEmployee =
thisXDocument.DOM.selectSingleNode("my:myFields/my:employee");
if(nodeEmployee != null){
if(nodeEmployee.text == ""){
// if the employee name is blank when we load the form,
// populate the employee node with the current user name
nodeEmployee.text = System.Environment.UserName;


Any help would greatly appriciated.
Thanks.
 

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