How to pass data from server/ client script to HTML field?

Bharath kumar6
Tera Expert

I need the description of the record to be placed at a HTML text area value in the portal.

Ho can I achieve this.

2 REPLIES 2

Ravindra Lodhi
Kilo Expert

Hi Bharath kumar,

You can use below code in widget that will copy description of record to HTML body.

HTML Script:

<div>Description<br><textarea ng-model=data.description>Enter text here...</textarea></div>

Server side Script:

(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
var inc = new GlideRecord('incident');
inc.get('57af7aec73d423002728660c4cf6a71c');
data.description=inc.description.toString();
})();

 

find_real_file.png

 I hope this will work.

Thanks

Mahesh23
Mega Sage

Hi,

Please refer below video

https://youtu.be/0gz3XzBM-Gs

https://youtu.be/pj68yoh0arI

 

Please mark my response as correct or helpful if applicable