Help whit Dropdowns in an Input Form ( Urgent)

J

Jhon S.

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.
 
H

Henning Krause [MVP - Exhange]

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)
 
J

Jhon S.

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...!
Henning Krause said:
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)


Jhon S. said:
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.
 
H

Henning Krause [MVP - Exhange]

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)


Jhon S. said:
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...!
Henning Krause said:
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)


Jhon S. said:
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.
 
J

Jeffshex

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.

Henning Krause said:
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)


Jhon S. said:
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...!
Henning Krause said:
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
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.
 
J

Jhon S.

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.
 
J

Jeffshex

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.

Jeffshex said:
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.

Henning Krause said:
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)


Jhon S. said:
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,

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
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.
 
H

Henning Krause [MVP - Exhange]

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)
 

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