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

Tip: Looking for answers? Try searching our database.

Secondary Data Source Filter Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JDArsenault - 24 Jan 2006 22:59 GMT
I've exhausted every suggestion (to my best ability) in this discussion group
before asking this question.

The senario:
I created a SQL view which shows me groups & supervisors. (1 group may have
many supervisors.)

In infopath I created a group field in which I want look up values from a
database connection, in which I created a database connection (Connection 1)
to this view. I modified the sql statement to select distinct groups (no
supervisors). This field works fine.

In infopath I created a supervisor field in which I want look up values from
a database connection, in which I created a database connection (Connection
2) to the same view. I modified the sql statement to select distinct
supervisors &
groups. This field works fine & returns supervisors, as is.

Now I want to limit the supervisors shown in the supervisor field according
to the group chosen in the group field. On the supervisor field properties, I
choose the Entries x-path button & choose the Filter Data button. I choose
the group
field from the Connection 2 data source, (which also supplies the supervisor
field) is equal to Connection 1 data source group field. I get the full list
of supervisors, not filtered.

My Entries field looks like this:  
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor[@Group =
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor/@Group]

I get the same thing visa-versa when I choose the group field from the
Connection 1 data source, is equal to Connection 2 data source group field.

What am I missing?
Greg Collins [InfoPath MVP] - 25 Jan 2006 00:58 GMT
If the following is what you are using:

/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor[@Group =
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor/@Group]

Then this is a problem. Why? Because you are checking the exact same field against itself. Basically, strip everything else away and you are checking if @Group = @Group. Which, of course, will always be true.

You mentioned two data connections... the filter should be comparing @Group against the other data connection. When you select your field (the second @Group), make sure you are selecting it from the second data connection, and not from the same data connection.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I've exhausted every suggestion (to my best ability) in this discussion group
before asking this question.

The senario:
I created a SQL view which shows me groups & supervisors. (1 group may have
many supervisors.)

In infopath I created a group field in which I want look up values from a
database connection, in which I created a database connection (Connection 1)
to this view. I modified the sql statement to select distinct groups (no
supervisors). This field works fine.

In infopath I created a supervisor field in which I want look up values from
a database connection, in which I created a database connection (Connection
2) to the same view. I modified the sql statement to select distinct
supervisors &
groups. This field works fine & returns supervisors, as is.

Now I want to limit the supervisors shown in the supervisor field according
to the group chosen in the group field. On the supervisor field properties, I
choose the Entries x-path button & choose the Filter Data button. I choose
the group
field from the Connection 2 data source, (which also supplies the supervisor
field) is equal to Connection 1 data source group field. I get the full list
of supervisors, not filtered.

My Entries field looks like this:  
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor[@Group =
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor/@Group]

I get the same thing visa-versa when I choose the group field from the
Connection 1 data source, is equal to Connection 2 data source group field.

What am I missing?
JDArsenault - 25 Jan 2006 21:47 GMT
This sounded like a good try. I couldn't get it to work though. So I created
2 separate views in SQL, 1 with group & the other with group & supervisor.

In infopath I created a group field in which I look up values from a
database connection, in which I created a database connection (Connection 1)  
to view 1. This field works fine.

In infopath I created a supervisor field in which I look up values from a
database connection, in which I created a database connection (Connection 2)
to view 2. This field works fine & returns supervisors, as is.

Now I want to limit the supervisors shown in the supervisor field according
to the group chosen in the group field. On the supervisor field properties, I
choose the Entries x-path button & choose the Filter Data button. I choose
the group field from the Connection 2 data source, (which also supplies the
supervisor field) is equal to Connection 1 data source group field. I get the
full list
of supervisors, still not filtered.

Now My Entries field looks like this:  
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor/@Supervisor[../@Group
= xdXDocument:GetDOM "InfoPathGroups")
/dfs:myFields/dfs:dataFields/d:InfoPathGroups/@Group]

> If the following is what you are using:
>
[quoted text clipped - 39 lines]
>
> What am I missing?
Greg Collins [InfoPath MVP] - 28 Jan 2006 17:13 GMT
According to your descriptions, your filter looks correct. But I might be missing something...

One question I must ask, regardless of how silly it may seem, is whether your Connection2 supervisors have all the same group associated with them, or have different groups associated with them. If all the same group, then what you are experiencing would be expected.

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

This sounded like a good try. I couldn't get it to work though. So I created
2 separate views in SQL, 1 with group & the other with group & supervisor.

In infopath I created a group field in which I look up values from a
database connection, in which I created a database connection (Connection 1)  
to view 1. This field works fine.

In infopath I created a supervisor field in which I look up values from a
database connection, in which I created a database connection (Connection 2)
to view 2. This field works fine & returns supervisors, as is.

Now I want to limit the supervisors shown in the supervisor field according
to the group chosen in the group field. On the supervisor field properties, I
choose the Entries x-path button & choose the Filter Data button. I choose
the group field from the Connection 2 data source, (which also supplies the
supervisor field) is equal to Connection 1 data source group field. I get the
full list
of supervisors, still not filtered.

Now My Entries field looks like this:  
/dfs:myFields/dfs:dataFields/d:InfoPathGroupsSupervisor/@Supervisor[../@Group
= xdXDocument:GetDOM "InfoPathGroups")
/dfs:myFields/dfs:dataFields/d:InfoPathGroups/@Group]

"Greg Collins [InfoPath MVP]" wrote:

> If the following is what you are using:
>
[quoted text clipped - 4 lines]
>
> You mentioned two data connections... the filter should be comparing @Group against the other data connection. When you select your field (the second @Group), make sure you are selecting it from the second data connection, and not from the same data connection.
JDArsenault - 30 Jan 2006 20:47 GMT
No Sir, they don't. One group may have multiple people listed as supervisors,
but supervisors are not associated with multiple groups.

> According to your descriptions, your filter looks correct. But I might be missing something...
>
[quoted text clipped - 34 lines]
> >
> > You mentioned two data connections... the filter should be comparing @Group against the other data connection. When you select your field (the second @Group), make sure you are selecting it from the second data connection, and not from the same data connection.
JDArsenault - 31 Jan 2006 19:25 GMT
I found the solution to this problem @
Solution: http://officeloc.iponet.net/en-us/assistance/HA011177131033.aspx

Thanks for your help

JD

> I've exhausted every suggestion (to my best ability) in this discussion group
> before asking this question.
[quoted text clipped - 30 lines]
>
> What am I missing?
Greg Collins [InfoPath MVP] - 03 Feb 2006 00:29 GMT
I'm glad to hear you got it solved!

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I found the solution to this problem @
Solution: http://officeloc.iponet.net/en-us/assistance/HA011177131033.aspx

Thanks for your help

JD

> I've exhausted every suggestion (to my best ability) in this discussion group
> before asking this question.
[quoted text clipped - 30 lines]
>
> What am I missing?
 
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.