Using one field on an InfoPath form to query a SQL database and populate another field on the form - InfoPath Dev
in

InfoPath Dev

Using one field on an InfoPath form to query a SQL database and populate another field on the form

Last post 03-26-2012 09:01 PM by achyut. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-26-2012 12:19 PM

    • achyut
    • Not Ranked
    • Joined on 02-26-2012
    • Posts 4

    Using one field on an InfoPath form to query a SQL database and populate another field on the form

    I tried to ......use one field in infopath .......to query a sql database and populate another field......... any help guys???? I am trying this for .....3 days... but could not find a working solurion eg..... If ..I type.....an employee ID....... Employee.....Name is...supposed to come...in next field..... any help would be appreciated
  • 02-26-2012 01:31 PM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Using one field on an InfoPath form to query a SQL database and populate another field on the form

    Stop sprinting to the computer.

    You should be able to set up a secondary dataconnection connecting to the SQL database.
    The secondary datasource will have 2 sets of fields 'Query' fields and 'Data' fields.

    • Find the employee Id field in the secondary datasource Query set and put that on your form as a control
    • Add a button with a rule to Query the secondary dataconnection
      Add another rule to set the field in your Main datasource to the value from the secondary datasource Employee Name Data set field.

    When an employee id is entered by the user into the first field and they press the button, the second field should populate with the name.

    Hope this helps. :-)

  • 02-26-2012 06:35 PM In reply to

    • achyut
    • Not Ranked
    • Joined on 02-26-2012
    • Posts 4
    thanx...though... I finally got it......... http://table38.com/ns/?p=9 worked perfectly for me..... thanx......skarn...
  • 02-26-2012 10:37 PM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

     great :-) That link is very good with the detail.

  • 03-22-2012 07:34 AM In reply to

    Been trying to get this working for 2 days. But in Preview, when I type in the ClientNumber nothing happens - no ClientName displayed. I am totally new to this ie. Infopath/Sharepoint but have quite a lot of expertise in c#,.net,Vissual Studio so I understand the concepts.  I have followed the instructions religiously. Do I need a submit button or something like that?

    Thanks

    Majella

  • 03-26-2012 09:01 PM In reply to

    • achyut
    • Not Ranked
    • Joined on 02-26-2012
    • Posts 4
    But ....I am trying same for browser enabled form.........just cant ...figureout....any help guys????
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.