How to display sp-variable-editor using spModal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 07:07 PM
Hello.
I'm trying to create a gimmick that uses spModal to display sp-variable-editor when a button is clicked.
However, since I don't know how to pass data such as tables and sys_id, the sp-variable-editor widget does not display properly.
Where and how should I write it in the script to pass the data to sp-variable-editor?
HTML:
<div class="panel-body">
<button type="submit" ng-click="c.onWidget('sp-variable-editor')" class="btn btn-primary post-btn ng-scope">reopen</button>
</div>
Client controller:
api.controller=function(spModal) {
/* widget controller */
var c = this;
c.onWidget = function(widgetId, widgetInput) {
spModal.open({
title: 'Displaying widget' + widgetId,
widget: widgetId,
widgetInput: widgetInput || {}
}).then(function(){
console.log('widget dismissed');
})
}
};
Regards,
Ro