Running sql queries from info path - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Running sql queries from info path

Last post 12-10-2008 05:46 AM by Jimothias. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-10-2008 03:35 AM

    Running sql queries from info path

    Greetings to all!

     I'm an SQL newborn and need to be treated tenderly :0)

    This is what I am trying to achieve...and I bet someone will reply with "You silly sausage, you need to do this....so simple :-)"

     I have an infopath form (expenses, not from the template, this is a from scratch form) which connects to a database that contains all our customers (column "customer") and the job numbers associated with that customer (column "order_no"). I'm running a query/data connection that drags (well...references it anyways) the customer names and job numbers into InfoPath. What I would love to be able to do is allow the end user to select the customer from a drop down, which would then filter the order numbers, so they only see the order numbers for that customer, which should only give them a list of around 5 - 6 rather than thoasands.

     If anyone can point me in the right direction I would be eternally grateful :0)

    Thanks in advance to anyone who can help

    James

  • 12-10-2008 04:20 AM In reply to

    Re: Running sql queries from info path

     Hi and welcome to the forums,

    Add a drop down field in the form and follow the below steps.

    1. Open the drop down properties by double clicking on the control.

    2. Select ‘Look up values from an external data source..' option button.

    3. Select the data base source in the Data source drop down.

    4. Click on button which is after the Entries text box.

    5. Select the ‘customer' column.

    6. Click ok until all the windows to be closed.

    Add another drop down for orders. And here you will do the filter based on customer. You can that filter using the following link.

    http://www.infopathdev.com/blogs/greg/archive/2005/07/06/Create-a-Cascading-List-from-a-Flat-Data-Source.aspx

    In the above link, they used xml as the secondary data source. Instead you can use data base as secondary source.

     

    Swathip
    www.ggktech.com
  • 12-10-2008 05:46 AM In reply to

    Re: Running sql queries from info path

    Your a genius!

    It seems so simple, I had all the connections in place to the relevant boxes, all I had to do was filter it. It seems if your using a SQL connection as a DB connection you don't need to make any other changes for repeating tables either.

    Thanks again Swathip, your help is much appreciated.

     James

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.