check to see if an infopath text field is not equal to a list of fields from sql table - InfoPath Dev
in

InfoPath Dev

check to see if an infopath text field is not equal to a list of fields from sql table

Last post 01-13-2012 04:05 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-11-2012 12:12 PM

    check to see if an infopath text field is not equal to a list of fields from sql table

    Hello,

    I have a data connection to a sql table.  The table contains a bunch of entried (for example names).  I want a user to type into a text box in infopath a new name but have infopath make sure that the name has not been used in the past by checking against the sql entries.

    I created a drop down list box connected to the sql table and I can see all the entries, but I'm not sure how to compare the newly entered text (text box) to the entries in name field from the sql table.

     any ideas?

     

    Thanks,

    -Bob

  • 01-11-2012 05:13 PM In reply to

    Re: check to see if an infopath text field is not equal to a list of fields from sql table

    I've attached a sample with a data validation rule that does what I think you want. When selecting the field from your SQL connection for the first part of the condition, you can use the drop down in the field selector to pick "Any occurance of" the field being equal to your main data source field. Save the sample locally, right click and select design to open in design mode and preview.

    Hilary Stoupa

  • 01-13-2012 11:57 AM In reply to

    Re: check to see if an infopath text field is not equal to a list of fields from sql table

    Very cool!

     How did you get the repeating field to load all the "Name" fields? 

    Thanks,

    -Bob

  • 01-13-2012 04:05 PM In reply to

    Re: check to see if an infopath text field is not equal to a list of fields from sql table

    For the condition for the validation, select your secondary data source field first. When you select the field, at the bottom of that dialog, where it displays what you've selected, there is actually a very hard to notice drop down. You can change that to "Any occurrance of" the field you are selecting.

    Hilary Stoupa

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