What is the XPath or XSLT equivalent of SUSER_SNAME()?

B

Biggie Rat

I am trying to autopopulate certain columns in an InfoPath 2003 form with the
login ID of the user. Is there an XPath or XSLT equivalent to SUSER_SNAME()
that I can use to achieve this?

FYI, I cannot ask the user to enter his/her own login ID, as the specific
column exists for audit purposes. I am able to datestamp each record with a
smalldatetime column using the InfoPath function now().

I have SP1 installed and should have all that functionality available. Any
assistance would be gratefully appreciated!
 
K

K.Ramana Reddy(GGK Tech)

Hi,

You can populate the logined user name to a filed in a form.
Use below code to populate.

For VB:
Dim X
set X = createobject("WSCRIPT.Network")

XDocument.DOM.selectSingleNode("Give the Xpath of the field you want
populate the user name in the form").text=X.UserName

For C#:

thisXDocument.DOM.selectSingleNode("Give the Xpath of the field you want
populate the user name in the form").text=System.Environment.UserName;

I hope this will help for you.
 

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