Browse Search - InfoPath Dev
in

InfoPath Dev

Browse Search

Last post 07-17-2010 04:37 PM by Skarn. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-17-2010 03:27 PM

    • Brenda
    • Not Ranked
      Female
    • Joined on 02-12-2010
    • Mesa
    • Posts 8

    Browse Search

    I'm using InfoPath 2003 and Access 2003. Because Access is not on everyone's computers, I've started creating read-only InfoPath forms so co-workers can search the database in real time instead of calling/emailing/visiting me for the information.

    Basically, my problem is with the limited capabilities of search. Or perhaps my limited knowledge of it. Is there a way to query/search, for example "sam", and have the results include "samantha" and "sam abdul"? If so, I know this is even more of a long shot, but is there also a way to query "sam abdul" and have the results include "samuel q abdul"?

    Thanks,
    Brenda

  • 06-21-2010 04:10 AM In reply to

    you can do all these things if you use custom code

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 07-17-2010 04:37 PM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Three ways -

    For both ways I use a secondary data connection to the database tables - the connection retrieves (at least) the 'ID' or primary key value which I can later use to retrieve the record(s) which match and any fields which I am wanting to search on.

    Method 1 : Use the 'datasource' filters option to set up a bunch of filters on the secondary source's values that get returned based on your 'search' field.

    Method 2: Use the 'Edit SQL' button on the data connection properties to add a Where clause and have a 'placeholder' for the values - then use jScript code to query the Secondary connection manually but adjust the SQL property to replace the placeholders beforehand with the value being searched for.

    Method 3: (similar to Method 1) Let the secondary datasource return ALL records - and then use conditional formatting on the display repeating section/table to hide those which don't match the search field.

    Now - finally - once you have a display of the records which match you may want to retrieve the full record data - put a button in the section/table which copies the ID value from the secondary datasource to the main datasource Query ID field.

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