- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2016 05:11 PM
We do have client/matter number reference fields on a UI page. I am trying to set the filter for the matter field based on the client field selection. Is this possible? Thanks!
<g:ui_reference id="clientNum" name="clientNum" table="u_clients" completer="AJAXTableCompleter" columns="u_client_name" order_by="name" onchange="xtest()"/>
<g:ui_reference id="matterNum" name="matterNum" table="u_matters" completer="AJAXTableCompleter" columns="u_matter_name" order_by="name"/>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2016 02:16 PM
The following code worked.
HTML:
Client Number
<g:ui_reference id="clientNum" name="clientNum" table="u_clients" query="active=true" onchange="setMatterFilter()"/>
Matter Number
<g:ui_reference id="matterNum" name="matterNum" table="u_matters" />
Client script:
function setMatterFilter(){
var CNSysId = gel('clientNum').value;
var MNLookUp = gel('lookup.matterNum');
MNLookUp.setAttribute('onclick',"mousePositionSave(event); reflistOpen( 'matterNum', 'not', 'u_matters', '', 'false','QUERY:active=true', 'u_client_number=" + CNSysId+ "', '')");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2016 10:10 AM
Hi Kalaiarasan,
Thank you. I will test this after each upgrade.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2016 08:11 AM
I have found that you also have to update the sys_display also if you would like the auto completer to also filter while typing.
So
gel('sys_display.matterNum').setAttribute('onfocus',"if (!this.ac) new AJAXReferenceCompleter(this, 'matterNum', '', 'QUERY:'u_client_number=" + CNSysId+ "', 'u_clients');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2017 09:16 PM
Hi Drew ,
Please explain the code
gel('sys_display.matterNum').setAttribute('onfocus',"if (!this.ac) new AJAXReferenceCompleter(this, 'matterNum', '', 'QUERY:'u_client_number=" + CNSysId+ "', 'u_clients');
this.ac , AJAXReferenceCompleter - refer to

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2017 09:27 AM
You do that to update the filter. I got the code from the client side script when inspecting the page. Not sure I can explain all that it does other than really what it already shows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2019 11:12 PM
Hello Poornima,
i am trying ti achieve same functionality but facing issues.
i have exact same code.
filter is working but value is not getting selected on second field.
have you also faced same problem?
Thanks
Neeraj