How to pass data from a catalog item widget to a widget in a macro variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2019 07:48 AM
I'm trying to migrate some UI macros using portal widgets. I have a variable of type Macro and I've attached a widget to it. I know I can get the parent g_form in the widget and also parameters from the url query but the data required by the widget is not available neither in the form nor in the url. I've thought about adding separate variables in the catalog item but there are too many parameters so I'd prefer a different solution.
The data is generated in the SC Catalog Item widget and attached to the data object in the controller. I've actually encountered this issue several times so I'm interested in more general solution which is not specific to the fields I need.
So is there a way go get the parent data from the widget in the variable?
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2019 02:38 AM
Nope, I have searched for that too.
To read other variables you need to use the g_form.getValue and to set use
$scope.page.g_form.setValue('variable name', value);