Filter drop down for unique fields

D

D

Please help! I have been playing witht his for about a week and can't seem
to get it to work. If someone could please tell me what I am doing wrong.

I am trying to filter a drop down so that only unique values show. I have
read, printed and studied
http://www.infopathdev.com/howto/tutorials/default.aspx?i=51dce616335a4ff6a78f2d289baf4651
I can't get it to work.

I am having the drop down pull from a secondary data source. All I can
think of is that I am not typing the path correctly.

This is how it is set up:
When I look at the Data Source Information the name of the secondary data
source is Equip Drop Down, then the first folder is called "myFields",
underneath it is a folder called "dataFields", underneath that is
"d:Equip_Drop_Down" and then inside that folder is ":model". (all minus the
quotes, of course)

I am trying to make a filtered drop down of "model"

So in the filter I choose "The expression" and then typed:
not(.=../preceding::my:Equip_Drop_Down/my:model)
and many other variations of the path to "model", but nothing seems to work.

Could someone please tell me what I am doing wrong. This is really driving
me CRAZY!

Thank you!
 
G

Greg Collins [InfoPath MVP]

Looks like you are getting your namespaces mixed up. A namespace is an essential part of the name of a node. In your original setup you describe "d:" and ":" (which ":" is the same as no namespace), yet in your filter you are using "my:". That's equivelant to knowing my name is "Greg" but calling me "Ted" instead. Gotta keep the namespaces straight.

So your filter (according to the earlier paragraph) should look like this:

not(.=../preceding::d:Equip_Drop_Down/model)
 
D

D

Thank you so much for your response. Unfortunately, it still doesn't work.
I even made a new form with just that drop down to test it out, and it
doesn't work.

Do you have any other ideas of where I am going wrong?

Thank you again!
 
G

Greg Collins [InfoPath MVP]

Is "model" an attribute or an element?

If an element, and your the drop-down list control is bound to the model element, then this should be working (double-check all your namespaces though).

If an attribute, then you need to be listing model as "@model".
 
D

D

That did it!!!!! It is an attribute.

Thank you! Thank you! I can not thank you enough! I have been playing
with this for so long. Thank you for helping me out!

-D
 

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