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 / June 2005

Tip: Looking for answers? Try searching our database.

Select  Drop-Downs value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike B - 29 Jun 2005 21:32 GMT
I have a drop-down list box that I have manually populated.  I am
trying to update what is displayed using custom code.  I do not want to
change what is already present just change what is being displayed.

Basically,  In the Drop down I have
Select... (Default)
A
B
C

With 1 Button I can change the Drop down to display A, with button 2 B,
Button 3 C, etc.

I have tried this in code, but all it seems to do is overwrite what I
already have there with what I have in my code.
this is what I have currently.
XDocument.DOM.selectSingleNode("//my:formStatus").text = "Working"

Originally the field was a text box but I decided to switch to a drop
down to enable using the status field in a conditional statement.

Thanks,
Mike
Scott L. Heim [MSFT] - 29 Jun 2005 22:55 GMT
Hi Mike,

I am not sure I am following what you need. If I place a drop-down list on
an InfoPath View and specify the values to be A, B or C, then I can
successfully set that control to any of those values using code like the
following:

XDocument.DOM.selectSingleNode("//my:field1").text = "B"

However, if I attempt to set the text value of this control to "Working" it
will fail as this is not a viable option in the list.

Is this what you are attempting or am I missing something?

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Mike B - 30 Jun 2005 15:46 GMT
Scott,

Thanks for the reply.  But I seem to have sent this too early.  I found
my issue which was I had forgotten to fully populate my dropdown box.
I guess it is best not to rush and ask a question at the end of the
work day.

Thanks again.
Mike
 
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.