I've done alot of searching, but I can't seem to find an explanation to a simple issue. Here's my scenario:
SQL 2008 Database with the following tables:
Table 'EMPL': Column 1 'EMPL_ID' int PK, Column2 'EMPL_NAME' varchar(20)
Table 'EMPL_DED': Column 1 'EMPL_DED_INDEX' int PK, Column 2 'EMPL_ID' int, Column 3 'DED_CD' int
Table 'DED_DESC': Column 1 'DED_CD' int PK, Column 2 'DED_DESC' varchar(20)
explanation
of field names: EMPL = Employee, EMPL_ID = Employee_ID, EMPL_DED =
Employee Deductions, DED_CD = Deduction Code, DED_DESC = Deduction
Description
Relationships: EMPL.EMPL_ID = EMPL_DED.EMPL_ID and EMPL_DED.DED_CD = DED_DESC.DED_CD
Infopath Data Source (Main) type:Submit Default table: EMPL with table EMPL_DED linked based on EMPL_ID
Secondary Data Source type: Receive Table: DED_DESC
Infopath Form:
Query Section: TextBox 'EMPL_ID' Datasource(Main).Binding(MyFields .q:EMPL .EMPL_ID
Record Section: 'Repeating Section' Datasource(Main).Binding(MyFields .d:EMPL .EMPL_ID, .EMPL_NAME
within Repeating Section 'Repeating Table' TextBox
EMPL_DED Datasource(Main).Binding(MyFields .d:EMPL(Group:Repeating)
.EMPL_DED(Group:Repeating) .DED_CD
When I run this form it works
100%. When I query an employee's ID, I get back the Employee ID,
Employee Name, and in a repeating table, a list of all of the Deduction
Codes that the employee has a record for in the EMPL_DED table.
My
problem is that I would like to include the DED_DESC field next to each
of the DED_CD fields in the repeating table. Not to be used as
submission data, but simply to present an understandable description to
the deduction code. I've gotten it to work 1 time, but I don't
remember how. But then I broke it when I tried to figure out how to
add a new entry to the repeating table, or even to set the DED_CD field
as a drop-down list that displayed both the DED_CD and DED_DESC.
I'd be happy to send you my simple SQL database and current form if that would help at all.