sn-record-picker not showing drop down
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2017 08:58 PM
Hi All,
I have a record picker in a widget to be used in a portal. I have put the record picker in the html div tags as follows:
<sn-record-picker field="location" table="'cmn_location'" display-field="'name'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
and withing the client side java I have put,
function($scope, $response) {
/* widget controller */
var c = this;
$scope.location = {
displayValue: c.data.loc.name,
value: c.data.loc.sys_id,
name: 'location'
};
$scope.$on("field.change", function(evt, parms) {
if (parms.field.name == 'location')
c.data.setLocation = parms.newValue;
c.server.update().then(function(response) {
spUtil.update($scope);
})
});
}
However the record picker does not show a drop down box of the table.
Thanks, any help would be appreciated,
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2017 09:48 AM
Are you getting any errors in the console?
I'm guessing you've already seen my tutorial:
https://serviceportal.io/sn-record-picker/
Did you try downloading the completed widget from Share?
https://share.servicenow.com/app.do#/detailV2/86b23f151370e2001d2abbf18144b0aa/overview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2017 02:11 PM
Hi,
No there are no errors. I believe the problem is with the record picker line itself as it is not showing a drop down box. I could not find a way to upload the xml file of your widget so I copied the code into another widget and it still didn't work.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2017 08:25 PM
Hi Roni,
I am facing the same issue. How did you correct it?
Regards
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2017 02:22 PM
When I press the pencil on the edit screen the drop down correctly displays however on the preview screen it is not there.