- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2024 03:15 AM
Hello all,
I have a requirement wherein I have a UI page on which we have let's say XYZ field and that field is referencing to sys_choice table.
However, I wanted to put filter as in whenever the user references XYZ field he should be able see certain records only from sys_choice table.
Could someone help me to achieve this in UI page.
Thanks!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2024 03:21 AM
Hey,
From what I'm understanding you're wanting a reference qualifier that restricts the options available on the reference field you've added to your UI page.
If you're using g:ui_reference you can specify a query
<g2:ui_reference id="my_choice_field"
name="my_choice_field" //Field name, used in client script to retrieve info
table="sys_choice" //The table to query
columns="name"
columns_search="false"
order_by="name"
show_popup="false"
query="inactive=false^element=XXX"
completer="AJAXTableCompleter"/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2024 03:21 AM
Hi,
If you have created the reference field on the UI page using <g:ui_reference/> then you just have to add one more parameter called query.
E.G: <g:ui_reference id="abc" table="incident" query="active=true"/>
If my answer helped you in any way please mark it as correct or helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2024 03:21 AM
Hey,
From what I'm understanding you're wanting a reference qualifier that restricts the options available on the reference field you've added to your UI page.
If you're using g:ui_reference you can specify a query
<g2:ui_reference id="my_choice_field"
name="my_choice_field" //Field name, used in client script to retrieve info
table="sys_choice" //The table to query
columns="name"
columns_search="false"
order_by="name"
show_popup="false"
query="inactive=false^element=XXX"
completer="AJAXTableCompleter"/>