Auto fill text box from secondary Sybase datasource - InfoPath Dev
in

InfoPath Dev

Auto fill text box from secondary Sybase datasource

Last post 07-01-2008 04:46 PM by exster. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-01-2008 09:14 AM

    • exster
    • Not Ranked
    • Joined on 07-01-2008
    • Posts 2

    Auto fill text box from secondary Sybase datasource

    I've been trying to auto fill a text box.

    I have a form with the userid and email text boxes.  I want to be able to have the user enter in the userid text box and auto fill the email text box by querying into a secondary source (Sybase Database).

    I have been reading the forums and doing the following:

    1.  Double click the email address text box and click on the formula button next to the Value box in "Default Value"

    2. Click on "Insert Field or Group" and select the Email field from my secondary source

    3. Click on "Filter Data ..." and click on "Select a Field or Group" and select the userid from my Main datasource (form)

    4.  The condition is "is equal to"

    5.  The 3rd value is the "UserId" in the Sybase secondary connection

    6.  Click on OK about 5 times.

    I'm trying to think of it via SQL but it's not working.  Not sure if this can be done.

    update form.email from secondaryconnection.user_tbl where form.userId = secondaryconnection.userid

    The strange thing is that if I do not use a filter, it will auto fill the email text box with the first record.

    Can someone please help?

    Thanks.

  • 07-01-2008 03:02 PM In reply to

    Re: Auto fill text box from secondary Sybase datasource

    InfoPath cannot connect to Sybase natively.

    You would need to use a web service from Sybase or use SQL or Access to connect to Sybase via ODBC and then have IP connect to the MS data.

    You must be using code.

    I would try dumping / displaying the data from your secondary connection and make sure there is not some spaces padded or something that is preventing your filter to find a match.

  • 07-01-2008 04:46 PM In reply to

    • exster
    • Not Ranked
    • Joined on 07-01-2008
    • Posts 2

    Re: Auto fill text box from secondary Sybase datasource

     I had already setup ODBC with sybase and connected that way.

     Your suggestion had worked!  The data I was searching for had some leading/trailing spaces.

     I had to use the "Contains" which I presume works like a " LIKE '%string%' ".

     Works like a charm now.

     Thanks for the insight.

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