Service Portal snRecordPicker directive advanced reference qualifier

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2018 02:34 PM
Hello,
I am using the 'sn-record-picker' directive in the Service Portal. I have it working with a basic query active=true.
<sn-record-picker table="'sys_user'" value-field="'sys_id'" display-fields="'email'" search-fields="'name,email'" page-size="100" default-query="'active=true'"></sn-record-picker>
I want a much more advanced query to pull the results, that is not possible to achieve with simple conditions. I already have a script include class that I am using for this purpose in an Advanced Reference Qualifier in the standard ui.
Is it possible to utilize script include class to populate the results (just like the Advanced Reference Qualifier in the standard ui)?
I would imagine there must be a way to pass in a script include method into the default-query attribute?
<sn-record-picker table="'sys_user'" value-field="'sys_id'" display-fields="'email'" search-fields="'name,email'" page-size="100" default-query="'advancedRefQual()'"></sn-record-picker>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2025 02:30 PM
Just wanted to clarify for anyone coming to this much later, you do not put "javascript:" in the argument for default-query. The property already accepts javascript as it's argument, you can just directly reference the js value or function.