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

Tip: Looking for answers? Try searching our database.

Query fields from different tables w/i same data source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vanessa - 03 Mar 2006 17:10 GMT
I have a data source that submits to the database.  It has a parent table and
a details table (Outages loj to OutageDetails).

I have several fields mostly from Outages(Id, Severity, etc) in my query and
only 1 field from OutageDetails (SystemID - an outage can appear multiple
timesin the OutageDetails table with the SystemID being unique among and
outageid).

If I query any fields from OUtages there is no issue.  If I query the
SystemID field by itself there is no issue.  When I try a combination of the
two...show me System X where Severity is SEV1, then it pulls all records in
Outage.  It seems like it doesn't know how to pass the query back to the
database properly.

Any ideas?
S.Y.M. Wong-A-Ton - 04 Mar 2006 16:05 GMT
Check whether the relationship between the two tables has been set up
correctly by going to Tools > Data Connections..., clicking on the
[Modify...] button, and then on the [Modify Table...] button.

InfoPath sets up relationships between tables automatically for you when you
add more than 1 table, but it's always a good practice to check these
relationships manually or set them up yourself, since the setup by InfoPath
is error prone.
---
S.Y.M. Wong-A-Ton

> I have a data source that submits to the database.  It has a parent table and
> a details table (Outages loj to OutageDetails).
[quoted text clipped - 11 lines]
>
> Any ideas?
Vanessa - 03 Apr 2006 19:39 GMT
Thanks.

I've tried it two ways.  

1st.  use the sql

select
    o.Outage_ID,
    Summary,
    End_Date,
    Duration,
    Hit,
    Created_Date,
    Entered_By,
    Fixed_By,Fixed_Group,
    Root_Cause,
    Severity,
    Tracking_Number,
    Explanation,
    Corrective_Action,
    Additional_Contact,
    CIO_Comments,
    Duration_Available,
    Duration_Scheduled,
    Active,
    Validated,
    o.Modified_Date,
    o.Modified_By
from
    csu_outage o
    left outer join csu_outage_details d on o.outage_id = d.outage_id
But it automatically disables submit when I do this.

The second way is to use the interface by adding the tables and checking the
joins.  It creates a few extra joins which I removed and the submit is fine.  

CSU_Outages
   CSU_Outage_Details
(an outage can be associated with multiple systems)

The only problem with this is the issue below.  If select a query field in
CSU_Outages it filters the result set properly.  If I drop a query field(ex.
System_ID) from CSU_Outage_Details, it returns the entire data set.  I've
made the query field a text field and entered a specific value, I've also
made the query field a drop down list tying it to a secondary source.  

Still No luck.

> Check whether the relationship between the two tables has been set up
> correctly by going to Tools > Data Connections..., clicking on the
[quoted text clipped - 22 lines]
> >
> > Any ideas?
 
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.