Pulling in Field Information

T

Tom

I am using a very basic button script to send the form directly in the email
versus sending it as an attachment. Here is the simple code I'm using.

function CTRL8_5::OnClick()
{

var oEnvelope = Application.ActiveWindow.MailEnvelope;

oEnvelope.Subject = ("Test");
oEnvelope.To = ("Test Name");
oEnvelope.Visible = true;

}

My question is what the structure is for pulling in information from one of
the form fields to reference in this code. For example I have a pulldown
menu called Name. I want to pass that information from the form to this
script to fill in the oEnvelope.To portion. In Access I would call the
function and include the fields i wanted to pass through but I'm unsure how
to do this in Infopath.

Also is there another oEnvelope function for controlling the CC and
Introduction Fields.

Thank You for any assistance offered.
 
K

K.Ramana Reddy(GGK Tech)

Hi,

Use the following code to get filed value in your form,

Vb Script:
Dim X
X = XDocument.DOM.selectSingleNode("Xpath of field").text

JScript:
var X;
X = XDocument.DOM.selectSingleNode("Xpath of field").text;
 

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