Submit and DDBoxes - InfoPath Dev
in

InfoPath Dev

Submit and DDBoxes

Last post 07-27-2006 11:29 AM by ziggybure. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-27-2006 10:06 AM

    Submit and DDBoxes

    Heres a breakdown of my Data Source:
    +Employees(Repeating)
    __+Orders(Repeating)
    ____+Order_Details(Non-Repeating)


    What I'm trying to do is:
    1. Select an Employee from a drop-down that is populated by a Secondary Data Source. (Done)

    2. Enter multiple Order #'s through text boxes.(Done)

    3. Attach the same Order_Details to ALL of the multiple Order #'s that were input. (ie. they all get the same Date and Time).

    4. Click a Submit button to enter the data in the database.

    Here is where I'm getting caught up:
    When I fill out the form and click "Submit", the data is stored as NEW records. This is all fine except for the Employees drop down. The selected Employee is being entered into the DB as a new record. I simply want to attach the Order #'s and Details to the already selected Employee, not create a brand new employee everytime.

    What am I doing wrong??? Please help!!!

  • 07-27-2006 10:13 AM In reply to

    How is your database schema setup? If you have seperate table for Employees and Order with a foreign key relationship, this should work. In this case, you will probably want to make two secondary data source connections: One for the employee table and one for the orders table. The Employee table will populate the drop-down and you will only submit the orders data source.

    Or maybe you should make your Main Data Connection connect to the orders table, and simply use a secondary connection to populate the drop-down. After this is done, you simply submit the Main DOM (which only has orders in it) and you should be done! In this scenario, you'll have to create another form or something to insert new employees, but this doesn't seem like a problem for you.

    If all else fails, we have this cool software called the Database Accelerator and it can take all kinds of XML and shred it into DB tables. Check it out:http://www.qdabra.com/proddetail.asp?prod=QDBXL1
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-27-2006 10:28 AM In reply to

    Matt,

    Here is my exact schema:
    +DMN_Employees
    _Employee_ID
    _Employee_Name

    __+DMN_Orders
    ___Order_ID
    ___Order_Number
    ___Notes
    ___Employee_ID

    __+FCT_Order_Details
    ___Order_ID
    ___Time_Out
    ___Time_In
    ___Date

    FYI - This seems to be a fairly simple setup... And is simply a tool to track and manage my employees daily productivity...

    I think I like your first solution a little better? But am still a little confused... Also, my Employees drop down is not in a table, it's in a Repeating Section... And I'm also not sure how to make a secondary connection to the Orders table, it doesn't seem as easy as the drop down was???

    Thanks for the quick response!!!
  • 07-27-2006 10:32 AM In reply to

    When I said table for the Employees, I mean in SQL. So you have one table for Employees and another for Orders.

    The main connection will connect to Orders, the secondary connection will connect to Employees. The drop-down on the form will be bound to the Employee_ID node of the Orders table, and it will use Employee_Name and Employee_ID fields of the Employees table to server as display name and value, respectively. Once this is done you can submit your main data source and it will have all of the pertenant information.

    To add a secondary data source to the Employees table, go to Tools -> Data Connections -> Add, and follow the wizard presented there.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-27-2006 11:29 AM In reply to

    Ok... I've done what you said and all is kosher except that now if I try to add a new row (adding through the form [right-click "Insert above/below...]), to add a new Order_Number, a new drop down is also added. So if I wanted to add say 10 orders then I would be provided with 10 drop downs. I really would like to only have 1 drop down which would be able to add multiple Order_Numbers??? I hope you can follow and understand what I'm looking to do, I know I'm not being very descriptive... Sorry... Again, thanks so much for the help!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.