Modify sn-record-picker default query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 09:51 AM
Hello Experts,
I want to modify the default query for the below script , i want to add the below mentioned conditions
Condition : if a user is active and name starts with
<sn-record-picker id="delegate" field="c.delegate" table="'sys_user'" default-query="'active=true'" display-field="'name'" display-fields="'email'" value-field="'sys_id'" search-fields="'name'" page-size="100" translate="no"></sn-record-picker>
right now default query runs checks for if the user is active and 'name contains' instead of name contains i want to check for "name starts" with.
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 09:39 AM
Hello,
Simply add the condition to your query.
The query below filters records where the active field is true and the name field starts with the letter "C", and then it orders the results alphabetically by name.
Replace "C" with the desired condition.
"'default-query="'active=true^nameSTARTSWITHC^ORDERBYname'"