- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2019 02:41 AM
Hi All,
I'm need to get the value of a variable user in widget scripting and populate it in custom widget field.
But i'm unable to use $scope.page.g_form.getValue('user') or $scope.page.field.getValue('user') it returns an error message
TypeError: Cannot read property 'getValue' of undefined
Kindly suggest any way to get the variable value in widget script
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 05:42 AM
Hi,
To get any values from any table , query the table in server script of the widget and store the values in data.testObj(if its only value you need) else save it in array of objects for example:
var items = [];
gliderecord query
in while loop(gr.next())
var item={};
item.sys+id= gr.getValue('sys_id')
Now, in client script you can get the values in $scope.data way.
Please refer the oob widgets for example SC Order Guide.
Mark this helpful/correct if it helped you.
Regards,
swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 05:42 AM
Hi,
To get any values from any table , query the table in server script of the widget and store the values in data.testObj(if its only value you need) else save it in array of objects for example:
var items = [];
gliderecord query
in while loop(gr.next())
var item={};
item.sys+id= gr.getValue('sys_id')
Now, in client script you can get the values in $scope.data way.
Please refer the oob widgets for example SC Order Guide.
Mark this helpful/correct if it helped you.
Regards,
swathi