- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 03:25 PM
Hi,
Having an issue with the default-query in an sn-record-picker.
It seems to properly accept the Active state and the Caller, but it will not filter by the Assignment Group.
default-query="active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()"
I obtained this by performing a query on the Incident Table and then right click filters > copy query.
When I view the picker, it shows any Active Incident for the currently logged in user, regardless of which assignment group it is in. The expectation is that it would be limited to one assignment group.
Full code is below.
Thanks,
Kenny
<!--<div class="incident" ng-if="c.data.showPicker && !c.data.showQueuePosition">
<p class="selectIncMsg">Select Incident</p>
<label for="incident-dropdown" class="incidentMsg" style="color:#41b6e6">Incident</label>
<sn-record-picker class="inc-picker"
id="inc-dropdown"
field="c.data.incId"
ng-change="c.server.update()"
on-change="c.showLocation(val)"
table="'incident'"
display-field="'number'"
placeholder="${Select an Incident}"
value-field="'sys_id'"
search-fields="'number'"
page-size="100"
default-query="active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()">
</sn-record-picker>
</div>-->
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 11:59 PM
Set the filter in server code and then use in HTML Template. Its working that way.
Server code
data.query = "active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()";
in HTML Template replace
default-query="active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()"
default-query="data.query"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 11:59 PM
Set the filter in server code and then use in HTML Template. Its working that way.
Server code
data.query = "active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()";
in HTML Template replace
default-query="active=true^assignment_group=c25fbdd8478855d07b1dc4e2846d43bd^caller_id=javascript:gs.getUserID()"
default-query="data.query"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2022 08:39 AM
This is working properly. Thank you!