The CreatorCon Call for Content is officially open! Get started here.

Search field on the UI page should be able to search on multiple fields

RiteshAlla
Mega Sage

Hi Team,

Currently i have a search field on the UI page searching on sys_user table. This search filed currently only allows me to search by users name.

How do i make this field to be able to search by email, userid, company or any other fields on the user table?

Please help

Ps: Client script code as attached.

HTML Code:

<?xml version="1.0" encoding="utf-8" ?>

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<html>
<body>
<h1> Select by a User or a Company </h1>
<table>
<th>Select a User:</th>
<th><g:ui_reference name="userRecords" id="userRecords" table="sys_user" completer="AJAXTableCompleter" onchange="generateTable()" /></th>
</table>
<br/>
<div id="dvTable2" style="overflow: hidden; height: 100%; width: 100%; position: absolute;" height="100%" width="100%">
</div>
<br/>
</body>
</html>
</j:jelly>

10 REPLIES 10

Reference fields inserted into UI Pages via "ui_reference" UI Macro only support a limited subset of options as compared to normal reference fields. One of the limitations is that there seems to be no way to control the multi-column search aspect, which is handled by the "ref_ac_columns_search" dictionary attribute for normal reference fields. As a workaround, you could try tricking the system by giving your field a name that matches a name of real field in a real table. For example, this code would probably create a reference field that behaves in the same way as the field Caller on the Incident form:

 

<g:ui_reference name="incident.caller_id" id="incident.caller_id" completer="AJAXTableCompleter" />