How to get value from a widget and set it to field in record generated from record producer?

Ridhima_1
Tera Contributor

Hi,

Greetings for the day!
I have a record producer looking like below on portal. There is a 'Subject' which is coming from a widget and the below 2 are variables. When a record is submitted incident is created with short description as entered 'Reference number'. However the requirement is to set short description as the subject entered by the end user. Please assist here.

Thanks in advance!

Ridhima_1_0-1715691718179.png


Regards

1 REPLY 1

CezaryBasta
Tera Guru

In the widget's client script, use the $scope.page.g_form object:

if ($scope.page.g_form) {
	$scope.page.g_form.setValue('some_variable', value);
}

 You can read more here.

--
See more of my content here.