Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2005

Tip: Looking for answers? Try searching our database.

Fill Text Box from Drop Down Selection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Jax - 19 Sep 2005 23:22 GMT
How do I place the item selected in a drop-down list into an existing text
field?
Franck Dauché - 19 Sep 2005 23:39 GMT
Hi Andy,

Your drop-down is linked to a node (f1) in your schema.  You need to copy
the value to the node (f2) behind your textbox.
You can do this easily by code behind your form using ofr example C#;
In the OnAfterChange Event of your drop down, just use code such as:
IXMLDOMNode oN1 =
thisXDocument.DOM.selectSingleNode("/my:Folder1/..../my:f1");
IXMLDOMNode oN2 =
thisXDocument.DOM.selectSingleNode("/my:Folder1/..../my:f2");
f2.text = f1.text;

Hope this helps.

Franck Dauché

> How do I place the item selected in a drop-down list into an existing text
> field?
Andy Jax - 19 Sep 2005 23:48 GMT
Thanks for the quick response Frank.  I am extremely new to InfoPath.  I have
several objects with the same name (i.e. GuidelineDescription).  One is a
drop-down to fill the query text field.  The query text field has the same
name.  Using your F1 and F2 example, how do I differentiate the two objects
with the same name?

Thanks

> Hi Andy,
>
[quoted text clipped - 14 lines]
> > How do I place the item selected in a drop-down list into an existing text
> > field?
Franck Dauché - 19 Sep 2005 23:54 GMT
Hi Andy,

Even if your fields have the same name, their XPAth from the root are
different (in your schema).  That is what the
selectSingleNode("/my:Folder1/..../my:f1") is all about.  You need to replace
/my:Folder1/..../my: by the actual full path in your schema.  Then both can
be actually named f1...

Franck Dauché

> Thanks for the quick response Frank.  I am extremely new to InfoPath.  I have
> several objects with the same name (i.e. GuidelineDescription).  One is a
[quoted text clipped - 22 lines]
> > > How do I place the item selected in a drop-down list into an existing text
> > > field?
Andy Jax - 20 Sep 2005 00:01 GMT
Sorry for the less than intelligent questions, but does the folder path
relate to the folder set-up in the Data Source view?  Is the were I get my
selectSingleNode path?

Thanks
Andy

> Hi Andy,
>
[quoted text clipped - 32 lines]
> > > > How do I place the item selected in a drop-down list into an existing text
> > > > field?
Franck Dauché - 20 Sep 2005 04:37 GMT
Yes, from the Data Source view, you can see the entire hierarchy from the root.

Franck Dauché

> Sorry for the less than intelligent questions, but does the folder path
> relate to the folder set-up in the Data Source view?  Is the were I get my
[quoted text clipped - 39 lines]
> > > > > How do I place the item selected in a drop-down list into an existing text
> > > > > field?
Andy Jax - 20 Sep 2005 15:22 GMT
Thanks for your help.  I am able to get a drop-down selection populating
another field. I appreciate your time, effort, and patience.

Andy

> Yes, from the Data Source view, you can see the entire hierarchy from the root.
>
[quoted text clipped - 43 lines]
> > > > > > How do I place the item selected in a drop-down list into an existing text
> > > > > > field?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.