- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2016 08:30 AM
Hello,
I am trying to create an input in a widget that functions the same as a List Collector (Glide List) catalog variable, but I can't tell if there is a directive out there that I can use.
I know that, for Reference Variables, there is a sn-record-picker directive, but I'm not sure if there are directives for the other types. Are there any other "Glide" types are there directives for, i.e. Lists/Duration, Date/Time, etc? I'm thinking they must be somewhere. The only place that I would think to find them would be in the Catalog Item widget, but that uses another directive <sp-cat-item item='item' /> to gather the variables, which I'm not sure I can even access.
Any ideas?
Thanks,
Brian
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 04:18 PM
Hi Brian to make a Glide list field, you can use the sn-record-picker directive. Here is an example:
HTML:
<sn-record-picker field="watch_list" table="'sys_user'" display-field="'name'" value-field="'sys_id'" default-query="'active=true'" multiple="true"></sn-record-picker>
Client script (you must set the field inside your client script):
function($scope, spUtil) {
var c = this;
$scope.watch_list = {
displayValue: variable_with_display_value_comma_separated, //This should not be null
value: variable_with_value_comma_separated, //This should not be null
name: 'watch_list'
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2016 11:40 PM
Hi
Take a look at the "Slush Bucket" widget. The ootb version is very simple, but you can modify it to be able to receive input about table and condition an then you can include it in other widgets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 05:35 AM
Thanks for the response!
I was thinking something more along the lines of the List Collector that shows up for Catalog Items in Service Portal. The one with the single input box that adds each item to it on the same line. The reason being that the list I am using would quite long, so I would rather the typeahead be used to find it.
It would be nice if there was a way to figure out what directive they used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 04:18 PM
Hi Brian to make a Glide list field, you can use the sn-record-picker directive. Here is an example:
HTML:
<sn-record-picker field="watch_list" table="'sys_user'" display-field="'name'" value-field="'sys_id'" default-query="'active=true'" multiple="true"></sn-record-picker>
Client script (you must set the field inside your client script):
function($scope, spUtil) {
var c = this;
$scope.watch_list = {
displayValue: variable_with_display_value_comma_separated, //This should not be null
value: variable_with_value_comma_separated, //This should not be null
name: 'watch_list'
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 07:14 PM
Awesome, thanks a lot. Is this documented anywhere? If not, are there any other variable types that can be used like this?