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.

Help whit Dropdowns in an Input Form ( Urgent)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jhon S. - 08 Jun 2005 16:29 GMT
Hi,
I'm also a newbie in Infopath, trying to create an input  form, whit a drop
down which is populated  from a database , and a texbox  that should show a
complementary data related to the selected option; this data is also in the
same table form where the drop down gets it data.
But i have no idea, how to do it.
Equipment (Drop Down)> Equipment Description (Text Box)

Any suggestions/help  would be much appreciated, Thanks,

Jhon S.
Henning Krause [MVP - Exhange] - 08 Jun 2005 16:49 GMT
Hi,

lets say you have bund your drop down to the field my:Fields/my:ddSelection.

And you have a textbox that is bound to field
my:Fields/dd:EquipmentSelection

Now, open the properties of the textbox and click on the fx button of the
"Default value".
Click on "Insert field or group" and select the Equipment description of the
secondary data source.
Click on "Filter Data".
In the first drop down select "Select field or group" and select the
Equipment id of the secondary datasource.
In the right drop down, select "Select a field or group" and select the
field that you have bound your drop down box to.

Et voilà.

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

> Hi,
> I'm also a newbie in Infopath, trying to create an input  form, whit a
[quoted text clipped - 10 lines]
>
> Jhon S.
Jhon S. - 09 Jun 2005 00:06 GMT
Sorry to bother you again but it doesn't  work,
can you please, expalin the procedure, how should I bound  the text box that
is asign to the description of the equipment whit the Equipment Selection  
and when you refer to "my:Fields/my:ddSelection." that is asign to the Drop
down for the Equipment selection it's on
"myFields/dataFields/d:Principal/Equipment_id or in the queryFields.
Please explain me whit details I'm  a little tired
Thank you very much...!

> Hi,
>
[quoted text clipped - 36 lines]
> >
> > Jhon S.
Henning Krause [MVP - Exhange] - 09 Jun 2005 07:55 GMT
Hi,

when I understand you correctly, you have a secondary datasource containing
the table with the equipment data, which has at least two columns: Possibly
an id, a name value and a description. You have bound the equipment (id,
name) to content the drop-down box. You have bound the selection of the
drop-down to a field in your primary datasource. Now you want the
description to to be displayed in the textbox when the selection changes.

So you basically have to bind the textbox the to the equipment description
and filter it by id, where the id matches the selected equipment.

Hope this helps,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

> Sorry to bother you again but it doesn't  work,
> can you please, expalin the procedure, how should I bound  the text box
[quoted text clipped - 50 lines]
>> >
>> > Jhon S.
Jeffshex - 09 Jun 2005 14:46 GMT
Will this pose a problem in repeating sections?  I've got mine to sort and
autofill a text box, but it is quirky and seems that it grabs info every now
and then from the previous section.

> Hi,
>
[quoted text clipped - 69 lines]
> >> >
> >> > Jhon S.
Jeffshex - 09 Jun 2005 17:15 GMT
I have the textbox autopopulated by the selection on the ProjectNumber.  
<<Rule:fill the field ProjectDescription with the database's
ProjectDescription FILTERED when MAIN FORM's ProjectNumber = DATABASE's
ProjectNumber.>>

Each repeating section wants to occaisonally grab the same textbox info as
the first section, (only some of the times though as weird as it does sound,
but it only happens when the ProjectNumbers are kind of close).

It's really weird and I can't figure it out.

> Will this pose a problem in repeating sections?  I've got mine to sort and
> autofill a text box, but it is quirky and seems that it grabs info every now
[quoted text clipped - 73 lines]
> > >> >
> > >> > Jhon S.
Jhon S. - 09 Jun 2005 17:01 GMT
Yeah you understand it perfectly, thanks,
like you said, I have a primary datasource (main table)  that stores all the
data and a  secondary datasource containing  the table with the equipment
data, which has 3 columns:
An id, an equipment_description and an equipment_area . I have bound the
equipment id to content the drop-down box. I have bound the selection of the
drop-down to a field in the primary datasource.
Now I want the description of the equipment to to be displayed in the
textbox when the selection changes.
But I get lost in these step I hope you can help me:
" So you basically have to bind the textbox the to the equipment description
and filter it by id, where the id matches the selected equipment."

bind is the same that bound, how did i do it  ?

I tried and  seams to work the first time, but it get stack in  the first
selection  a   I'm  using this relation in Default Value  Fx :
@Area_Equipo[@Cod_Equipo = @Cod_Equipo]
in Xpath :

xdXDocument:GetDOM("Equipos")/dfs:myFields/dfs:dataFields/d:Equipos/@Area_Equipo[../@Cod_Equipo = ../@Cod_Equipo]

Any help  would be much appreciated, Thanks,
Jhon S.
Henning Krause [MVP - Exhange] - 09 Jun 2005 20:24 GMT
Well, your XPath expression can not work the way it is,

xdXDocument:GetDOM("Equipos")/dfs:myFields/dfs:dataFields/d:Equipos/@Area_Equipo[../@Cod_Equipo
= ../@Cod_Equipo]
since [../@Cod_Equipo = ../@Cod_Equipo] will always evaluate to true. But I
stepped on the same error while testing....

With repeating values, it gets a little trickier.. :-)

It turns out that you should not rely on the command builder from Infopath
when it get to this kind of queries.

Try this expression:

xdXDocument:GetDOM("Equipos")/dfs:myFields/dfs:dataFields/d:Equipos[@Cod_Equipo
= current()]/@Area_Equipo

Note that current() gets you the node you are currently on. In this case,
the field that you have bound your drop-down box to. Now you set the value
of the textbox to the above query.

Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)

> Yeah you understand it perfectly, thanks,
> like you said, I have a primary datasource (main table)  that stores all
[quoted text clipped - 24 lines]
> Any help  would be much appreciated, Thanks,
> Jhon S.
 
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.