Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Unable to Pass Value from Custom Variable Type Widget to Another Variable in Record Producer

Nandini22
Tera Contributor

I've created a button in a record producer using a custom variable type containing custom widget. Now this widget is containing a data which has to be passed to another single text line variable. 

 

How to achieve this. suggest please?

 

Regards,

Nandini

2 REPLIES 2

Nilesh Pol
Kilo Sage

@Nandini22 

Assume:

Custom widget contains a value: widgetValue
Target Single Line Text variable name: u_target_text

In your widget client controller: 

c.passValue = function() {
var widgetValue = c.data.selectedValue;
if (typeof g_form != 'undefined') {
g_form.setValue('u_target_text', widgetValue);
}
};
When the button is clicked:
<button class="btn btn-primary"
        ng-click="c.passValue()">
    Send Value
</button>

Hi @Nilesh Pol ,

 

Is there any easy way to create a button in the record producer , this button should be visible in the csm portal as well. And when this button is clicked, I need to display few other variables of the record producer.