Validate textbox field against sql - InfoPath Dev
in

InfoPath Dev

Validate textbox field against sql

Last post 03-17-2008 06:29 AM by jar92380. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-12-2008 08:41 AM

    Validate textbox field against sql

    Hello

     

    This may seem like something very easy but I just can't get it working correctly.  I have a text box field and a submit button setup.  The submit button takes the data from the textbox and I want it to check a particular table in a SQL DB, and if the number is there to display some static numbers. 

     

    Here is what i have so far

    Conditions

    JobNumber is equal to WBS1 (SQL DB field)

    Actions: Query using a data connection: sql db

    Set a field's value airfare = @airfareamount

     

    When i press the submit button all 0's are placed in the static field and I know there is a true number in there since I placed in the number

     

    Any ideas?
     

  • 03-12-2008 08:56 AM In reply to

    Re: Validate textbox field against sql

    So the problem is you are getting the values from the very first record not the one selected?

    A filter is what you need to say set the values but where jobnumber = WBS1.

    When selecting @airfareamount use the filter button and add WBS1 = JobNumber

    That way you get the data for the correct record.

    I work with databases and InfoPath every day.

    If you want to email me I could show you some examples.

  • 03-12-2008 09:17 AM In reply to

    Re: Validate textbox field against sql

     Clay

     

    I just shot you an email 

  • 03-17-2008 06:29 AM In reply to

    Re: Validate textbox field against sql

    Can someone please look at my code to see where I went wrong please 

    xdXDocument:GetDOM("Vision Database")/dfs:myFields/dfs:dataFields/d:ProjectCustomTabFields/@custReimbursibleMaxRateAir[../@WBS1 = xdXDocument:get-DOM()/my:travelRequest/my:JobNumber] 

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