How to dynamically change the TI button Caption in UX

Just wondering if it is possible to have a dynamic Caption for a TI button? I have tried “$<<instance.filter>>, it seems work, but only after I refresh the whole page (the global filter get refreshed”.

What I am trying to do is that there is a “update” TI with two workflow functions: submitted and cancel, depends on a global filter value, I would like to show a more appropriate caption (Submitted or Cancel) instead of “Update”.

Appreciate any suggestions!

CustomFunctions.self.$rootScope.$on(‘settingsUpdated’, ()=>{
console.log(“UPDATE VALUE IN THE TI BUTTON”);

    })

Add this to the custom-functions.service.js file and inside the onInit function to get a custom listener every time the global settings value is changed this will fire then make your ti button htmlTemplate so you can have a hook to the CustomFunctions Service through the custom html.
Let me know if this make no sense to you and i will give more step by step instructions on how to achieve what you are after