Query fields from different tables w/i same data source

V

Vanessa

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

S.Y.M. Wong-A-Ton

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

Vanessa

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.



S.Y.M. Wong-A-Ton said:
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


Vanessa said:
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?
 

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