getValue (VBScript)

V

valendes

Hi

So here's my problem:

I create a new form. I add a textfield, name it "field1" and set its value
to "05"
Then i open the scripteditor using VBScript.
This is the Code I tried to use for reading the value of field1 and pass it
to the variable content (when opening the document):
 
B

bratt

The
InfoPath.XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text
should work provided the myFields has the proper case. - xpath's are
case sensitive.

You can also get it by looking for the field anywhere within the XML
path:
InfoPath.XDocument.DOM.selectSingleNode("//my:field1").text
 
V

valendes

You can also get it by looking for the field anywhere within the XML path:
InfoPath.XDocument.DOM.selectSingleNode("//my:field1").text

Thank you
I tried this one, but it's not working as well.
I checked the field name several times, and it has the proper case.
(but you're right, i wrote Myfields instead of myFields when i was using the
whole xpath)

Do i have to create any objects for reading that value or add any other code?
 

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