This topic is locked

Search by Display Value

7/18/2007 10:48:50 AM
PHPRunner General questions
C
ccuser author

If you use a Lookup Wizard and format a entry to link an Id field but display its name, then is it possible to search make that field searchable by the display field rather than the link field?
Thanks

J
Jane 7/19/2007

Hi,
you can do the following:

  1. edit your SQL query on the Edit SQL query tab. Use JOIN clause:
    select `tablename1`.`fieldname1`,

    `tablename1`.`fieldname2`,

    ...

    `tablename2`.`displayfieldname`

    from `tablename1` inner join `tablename2`

    on `tablename1`.`linkfieldname1`=`tablename2`.`linkfieldname2`


2. check off displayfieldname on the list, search and advanced search pages on the Choose fields tab.