exact match vs "like" (or begins with) - InfoPath Dev
in

InfoPath Dev

exact match vs "like" (or begins with)

Last post 03-05-2008 11:10 PM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-05-2008 09:01 AM

    exact match vs "like" (or begins with)

    I thought I saw, somewhere, code that lets a person do a search within an infopath form that would be a "like" or "begins with" search, instead of an "exact match" search that infopath does by default when connected to a database.

     

    Anyone know?

     

    Thanks! 

  • 03-05-2008 12:17 PM In reply to

    Re: exact match vs "like" (or begins with)

    If this is a static query you can edit the SQL select statement in the Data Connection.

    A web service can give you the ability to dynamically query.

    Within a form you can use the contains to get like functionality.

    What is your situation? What are you trying to do?

  • 03-05-2008 07:09 PM In reply to

    Re: exact match vs "like" (or begins with)

     I have an assets table.  I want the people to be able to do a search on an asset to see if it's already in or not.  It can't be an "exact match" type of search because people could type it in a bit different.  So I want to let them do a search like      select asset_name from assets where asset_name LIKE "%   text entered  %" 

  • 03-05-2008 11:10 PM In reply to

    Re: exact match vs "like" (or begins with)

    Yah definitely could be done with a web service.  There are some posts here though on a way in code to do a query and use a variable in the Sql statement.

    Unfortunately, in the basic database functionality this is not possible unless you load everything. Then you could use the contains to search or filter your list.

    Another option would be to create a dataconnection for just asset name, which would be a smaller query. Then they could select from this list and then do the larger query and pull all of the related information.

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