The CreatorCon Call for Content is officially open! Get started here.

Run Script or Maybe Trigger Event from UI Builder BUTTON Component

vluz
Tera Contributor

Hi All,

 

I've followed some tutorials and I was able to create a new UI builder Page like this

vluz_0-1759421647557.png

Now, I need this "Notify" Button to trigger an event or maybe even run a client script right away
If possible I want also to grab the value from the field above ...

Does Anybody has any experience with it?

3 REPLIES 3

M Iftikhar
Mega Sage

 @vluz , 

Could you share a bit more detail on what you want the “Notify” button to do after being clicked? For example, are you trying to:

  • Trigger a page-level event that other components can listen for?
  • Run some client-side logic immediately (like a script action)?
  • Or capture the field value and pass it somewhere else (like to a data resource or server script)?

vluz
Tera Contributor

Hey @M Iftikhar thanks for helping out,

I would say both running a client side logic immediately OR capture the value of the field and sending it to the a server script would help

Since running a client side logic immediately would allow me to (maybe) do a GlideAjax and run my code
And passing the values of the field above the button to the server side would also allow me do perform the desidered actions

vluz
Tera Contributor

@bradtiltonnow any comments?
@Brad Tilton