- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2017 07:42 AM
Is there any way to retrieve a widget data and create a new Record Producer based on that data.
If someone have a solution please advice me to achieve this.
I want to create a new Record Producer based on this details. (New Record Producer as a Name) and others as Variables.
Regards,
Anna.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2017 01:11 PM
Hi Anna,
It appears you and I have similar requirements. My widget contains a table, with basic functionality like adding rows and inline editing.
The only way i've discovered to pass the data object is create a hidden catalog variable to store the serialized data object.
Widget client script:
$scope.page.g_form.setValue("hidden_widget_value", angular.toJson(c.data.notes));
Then on catalog client script you could do something like :
function onSubmit() {
var data_from_widget = g_form.getValue('hidden_widget_value');
/* parse string to object, then iterate object to insert records into table */
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 11:18 PM
Hi Claudia Cruz,
Please refer this ticket, then you will get some idea,
Add Dynamic single line text variable in Service Portal
And I just write the code in the Record Producer script.
regards,
Anna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2018 11:16 PM
Hello Kris,
I also have the same requirement i am not trying to create record producer, I am trying to write in one of the record producer variable. But i am having the record producer also in the service portal. So from the Sc catalog item widget i am trying to write on hidden record producer variable and i am trying to get that value from the hidden variable.
But i am not able to achieve it. Instead i am getting an error that cannot find set value from undefined.
Could you please provide any solution or suggestions regarding this ?
Any suggestions or solution will be helpful.
Thanks,
Ruthra.v

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 12:33 PM
Hi ruthrav,
Were you able to find the answer? If not, could you post the "Client Script" for your widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2017 06:17 AM
Anna,
If I understand correctly, you're trying to build an interface that will allow users to create Record Producers from the portal? Why not just give them Catalog roles so they can create the catalog item inside the tool?
thanks,
Andrew Cadaret
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 06:39 AM
Hi there, you can use "CustomEvent" as an "event publisher & subscriber" in widget controller & record producer catalog client script, something like:
1. Fire an event In widget controller:
CustomEvent.fireAll('hs-event', c.data.eventGenerated);
2. Listen the event in catalog client script (onLoad type script normally):
CustomEvent.on('my-event', function(newValue) {
g_form.setValue('description', newValue);
});