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 / October 2006

Tip: Looking for answers? Try searching our database.

drop down list box problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike_D_Man - 23 Oct 2006 23:22 GMT
This is a re-posting of a question asked on the 20th, but things have
changed a little.

Here is an example table.

1 - Text
2 - Covers
3 - Jacket
4 - Insert

The codes (1-4) are what is real important, but the people filing out
the form need to know what those codes mean.  Right now, these are in a
table at the bottom of the form that they fill out manually.  My idea
was to put these in a pull down list box.  However, while I need the
users to see the text, I only need to capture the number.  One would
think that if I set the value to "1" and the display name to "text"
that I should get what I want.  However, when I do this, the form
stores the "text" and not the number.

How can I /should I do this?
Terry - 24 Oct 2006 05:31 GMT
Hi Mike,

This is really easy to do.  all you do is set a value of 1, 2, 3 and 4
but set the display name to the description.

Terry

> This is a re-posting of a question asked on the 20th, but things have
> changed a little.
[quoted text clipped - 16 lines]
>
> How can I /should I do this?
Russ - 24 Oct 2006 16:17 GMT
You can check that it works by inserting an expression box into your form,
and setting the datasource of the expression box to your drop-down list box.  
If you've set the values correctly, they should appear in the expression box
when you preview the form and select different items from the list box.

> Hi Mike,
>
[quoted text clipped - 23 lines]
> >
> > How can I /should I do this?
Mike_D_Man - 24 Oct 2006 22:34 GMT
Thanks to both of you.  However...

I was already doing what Terry suggested.  I go to fill out the form
using the drop boxes I have created.  Then I go to print view to see
what I will get.  In the print view, the options chosen (the text) are
still showing, and not their corresponding variables.  So, using the
example previously given, I chose "Text", but instead of seeing "1" in
that field in print view, I am seeing "Text".  However, when I used
Russ's idea to test it, I did get the results he suggested: the
expression box contains the "1" even as the field in the form (the
drop down list box) shows "Text".

I did not have this issue when I was using a Master:Detail control to
enter the date: the field in the Master would show "1".  However,
remember that I ultimately I want the lists at the bottom of the form
to go away?  Well, the same applied to the detail section.  The best
solution for me would be to have a way to make the detail section not
be present.  Can I insert a control to close the detail section just as
there is one to open it?  Or should I instead create a new view (for
printing) that does not show the detail section?

> You can check that it works by inserting an expression box into your form,
> and setting the datasource of the expression box to your drop-down list box.
[quoted text clipped - 7 lines]
> >
> > Terry
Russ - 24 Oct 2006 22:58 GMT
There's probably more than one way to do this, but creating a seperate print
view is the one that I would choose.  It seems like it wouldn't be too hard
to just copy most of your default view to a new print view, but use the
expression box I mentioned before to display the value where you need it.

> Thanks to both of you.  However...
>
[quoted text clipped - 28 lines]
> > >
> > > Terry
Mike_D_Man - 24 Oct 2006 23:28 GMT
Thanks, Russ.  I am going to go with that.  Just so you know, though,
when using the drop down list boxes on the detail like that, it does
populate the corresponding field on the master with the proper value
and not the display name.

> There's probably more than one way to do this, but creating a seperate print
> view is the one that I would choose.  It seems like it wouldn't be too hard
> to just copy most of your default view to a new print view, but use the
> expression box I mentioned before to display the value where you need it.
BronwenZ - 26 Oct 2006 03:12 GMT
Hi,  The other thing we do in this situation is for every id to have a
corresponding description attribute in the schema, and in the onafterchange
of the drop down set the description attribute to the text value.  Then on
the print view we bind to the description attribute rather than the id.

> Thanks, Russ.  I am going to go with that.  Just so you know, though,
> when using the drop down list boxes on the detail like that, it does
[quoted text clipped - 5 lines]
> > to just copy most of your default view to a new print view, but use the
> > expression box I mentioned before to display the value where you need it.
 
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.