How to populate the field details from a popup to the Record producer form in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 10:08 PM
On the Record Producer I have custom widget variable which opens a popup.
On click of Submit button, I want to copy the field details from the popup to the Record Producer form Department field.
I don't want to make any changes to the OOB 'SC Catalog Item' widget.
Could you please advice.
Many Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 10:11 PM
why to use widget?
why not use a OOB variable which is of type reference?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 12:04 AM
I have a requirement to implement something like this. I just posted this as an example.
The field in the pop-up could be a dropdown with options or a text field.
On Submit , I need to copy the values from the popup to it's corresponding field on the record Producer form (in Service Portal)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 12:12 AM
but can't you re-use any existing variable type if you already know what user will be populating like reference, choice, checkbox etc
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 12:32 AM
Hi @RevathiV ,
You can use $scope.page.g_form in the widget client script to set the catalog variable value from the custom widget.
Use the below code in the Submit button's ng-click function.
$scope.page.g_form.setValue('field name', <input field value>);