Use secondary data source as drop_down list box description, but not submit to main data source - InfoPath Dev
in

InfoPath Dev

Use secondary data source as drop_down list box description, but not submit to main data source

Last post 12-17-2009 08:37 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-17-2009 07:41 PM

    Use secondary data source as drop_down list box description, but not submit to main data source

     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.
  • 12-17-2009 08:37 PM In reply to

    Re: Use secondary data source as drop_down list box description, but not submit to main data source

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.