Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI Builder button trigger client script and fill input of textarea value

ozgurD
Tera Contributor

Hello,

I have in my ui builder a textarea and under that a button. Now i want the value of the textarea to end up in a client script when something is entered in the textarea and then the button is clicked. For this I have selected “Execute Client script” for the button under Events and selected my created client script here. But now I can't get it to read the value from the textarea field in my client script. Can anyone help me here? I have following in my client script:

function handler({api, event, helpers, imports}) {

api.setState('textInput',event.payload.textarea_1);
}
But the value of textarea will be not filled. 
 
Thank you for your help
0 REPLIES 0