Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Dynamically Change UI Action Text on load

vtred
Tera Contributor

Hi,

I have a UI Action on the Change table called ----> "Test 123" 
when the state of the change ticket is "new" --> the UI Action/button should display as "Test 456"

I would like to know how to achieve this with onLoad client script or any other way possible..

4 REPLIES 4

sonali panda1
Mega Sage
Hi You may need to do Dom manipulation to achieve this which isn't recommended. Alternatively, you can have 2 ui actions created with conditions added to show 123 when new record just having it to show on insert by clicking insert checkbox, when it's not new show 456.

vtred
Tera Contributor

Yeah, I wanted to verify if there are any other options available out there without creating multiple UI Actions.

Ankur Bawiskar
Tera Patron

@vtred 

I believe there are only 2 ways

1) DOM manipulation

OR

2) create 2 separate UI actions

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@vtred 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader