Please help!

J

Joanne

I am really, really new to InfoPath and I'm struggling to get through a
project. I need to prepopulate any kind of control (at this point I don't
care), with the person's name who is logged into the computer. By sheer luck
I have managed with Windows Scripting host, running inside of VB (not
VB.net), to get the name of the user. Then I want to compare that name to a
field in a table in Access called "loginID". If they are the same, then I
would like to display the "Full Name" field from the Access table. So, I have
a user name JSmith, somehow (which I haven't figured out yet!) I have to run
a comparison of that name with a field name (LoginID)in my Access table and
then when I find JSMITH, I need to display his full name "John Smith", in
whatever kind of InfoPath box will work for this. In doing some research, I
think I need the XDocument object. I came up with the following code:
sNodeText =
thisXDocument.DOM.selectSingleNode("//dfs:myFields//dfs:dataFields/d:tblMentor/@LoginID").text;

All I get is an error that the template is invalid. Please, could someone
just get me past this first step. I can't see that the template is invalid.
It seems perfectly valid to me. Thank you so much.
 
A

ashley.lawrence

I am really, really new to InfoPath and I'm struggling to get through a
project. I need to prepopulate any kind of control (at this point I don't
care), with the person's name who is logged into the computer. By sheer luck
I have managed with Windows Scripting host, running inside of VB (not
VB.net), to get the name of the user. Then I want to compare that name to a
field in a table in Access called "loginID". If they are the same, then I
would like to display the "Full Name" field from the Access table. So, I have
a user name JSmith, somehow (which I haven't figured out yet!) I have to run
a comparison of that name with a field name (LoginID)in my Access table and
then when I find JSMITH, I need to display his full name "John Smith", in
whatever kind of InfoPath box will work for this. In doing some research, I
think I need the XDocument object. I came up with the following code:
sNodeText =
thisXDocument.DOM.selectSingleNode("//dfs:myFields//dfs:dataFields/d:tblMen­tor/@LoginID").text;

All I get is an error that the template is invalid. Please, could someone
just get me past this first step. I can't see that the template is invalid.
It seems perfectly valid to me. Thank you so much.

Hi Joanne,

Which version of InfoPath are you running?

Regards,

Ashley
 

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