UI Builder - Input and button functionality

Gabriella Alves
Tera Expert

Hello, everyone! 

I'm with a UI Builder project but I'm still trying to learn (my focus before was Service Portal). 

So, I created a simple Input and a Button:

GabriellaAlves_0-1669230651378.png


What I need to do is, when user click on "Import" button, must get the value inserted on input field and pass to a Script Include. 
I know how to do it using Service Portal but I have no idea how it works on UI Builder.

Can someone help me please?

#uibuilder 

1 ACCEPTED SOLUTION

Guido Bernuetz
Giga Guru

Hi Gabriella,

do the following:

  1. Create a Client state parameter to store the value of the input field
  2. Assign "Update Client state parameter" event to the input field
    GuidoBernuetz_1-1671218833383.png
  3. Create a Data Broker and define input parameter to call your script include
    see: https://www.servicenow.com/community/developer-articles/ui-builder-get-and-update-data-by-data-broke...
  4. Define the data broker as a data resource on your page
  5. Assign the Data Resource call to the Import Button and assign client state parameter to the parameter of the data resource
    GuidoBernuetz_0-1671218763256.png

 

 

I hope that helps you.

I am not a helpful hunter.
I will always try to give a meaningful and valid answer.

View solution in original post

3 REPLIES 3

Guido Bernuetz
Giga Guru

Hi Gabriella,

do the following:

  1. Create a Client state parameter to store the value of the input field
  2. Assign "Update Client state parameter" event to the input field
    GuidoBernuetz_1-1671218833383.png
  3. Create a Data Broker and define input parameter to call your script include
    see: https://www.servicenow.com/community/developer-articles/ui-builder-get-and-update-data-by-data-broke...
  4. Define the data broker as a data resource on your page
  5. Assign the Data Resource call to the Import Button and assign client state parameter to the parameter of the data resource
    GuidoBernuetz_0-1671218763256.png

 

 

I hope that helps you.

I am not a helpful hunter.
I will always try to give a meaningful and valid answer.

can you make a video for this whole process.....it would be of great help.
Thanks.

 

Gabriella Alves
Tera Expert

Thank you!! It helped!