Validate field against secondary data source - InfoPath Dev
in

InfoPath Dev

Validate field against secondary data source

Last post 07-01-2010 12:25 PM by marcusjclifford. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-01-2010 08:47 AM

    Validate field against secondary data source

    I'm having some problems with getting validation to work against a secondary data source, in this case a field in a SQL table.

    My situation is that I have a SQL table with say 500 records, with a column for ProductCode, what I want is a text field on the InfoPath form (e.g. TextField) that allows the user to type in the product code, for example HDR1203, what I want to then do is validate this against the data source to check if that code exists (e.g. Field in datasource ProductCode), if not I want the standard validation (red dashed border etc) to occur.

    I've got the data source working fine, and I can get it to "work in the wrong direction" by using the validation condition "TextField is equal to ProductCode", this then highlights the field (as invalid) if the data IS in the table, but if I change this to "is NOT equal to" then it does not work at all - it is always showing the data validation highlighting.

    Please can anyone help with this, I guess it must be something simple that I'm missing, but it is frustrating!

     Thanks

    Marcus 

     

  • 07-01-2010 11:44 AM In reply to

    Re: Validate field against secondary data source

    Hello Marcus,

     Maybe you could try a dropdown box instead of your textbox, and populate the dropdown with the values of the SQL table. That way you'll be sure that the user choose an existing product code.

    Hope that helps!

  • 07-01-2010 12:25 PM In reply to

    Re: Validate field against secondary data source

    Thanks for the suggestion, but with 500+ items that is not acceptable in this case.

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