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

Tip: Looking for answers? Try searching our database.

Filter drop down for unique fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
D - 30 May 2006 15:29 GMT
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=51dce616335a4ff6a78f2d
289baf4651

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!
Greg Collins [InfoPath MVP] - 30 May 2006 18:11 GMT
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)

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )

D - 30 May 2006 18:39 GMT
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!

> 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)
Greg Collins [InfoPath MVP] - 30 May 2006 18:47 GMT
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".

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )

D - 30 May 2006 20:19 GMT
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

> 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".
Greg Collins [InfoPath MVP] - 30 May 2006 20:49 GMT
I'm glad I could help!

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )

 
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.