UI macro visibility

mrcarter
Tera Contributor

I have an update button in our incident form which when in the portal under resolved calls I want to hide.   I tried creating UPdate UI action and created against Incident but I want that button to be only visible if the call is not resolved or closed.   I am struggling to get the conditions to work.  

CAn anyone help?

10 REPLIES 10

Chuck Tomasi
Tera Patron

HI Damian,



The preferred method to do buttons is with UI actions, not UI macros. You can add conditions to tell the system when to display the UI action.



UI actions


Sorry chuck, meant to say its UI actions.   I want to make the conditions for the button so that in self service its not visible unless on open calls.


This is what I have



find_real_file.png


Was this based on an existing UI action? There are a couple conditions in there that look sketchy to me.



current.getUser.hasroles() is not a method on a property that I'm aware of.


current.status != Resolved



If the data type of status is string, then it should be 'Resolved'. If you are looking at the "state" field, then it's going to be a numeric value corresponding to the label "Resolved" (e.g. 5)



If you are just looking to show the Update field on "active' (not closed/cancelled) records, then the simplest option would be a condition that just says:



current.active



That's going to evaluate to true if it is active and false it is not.