Using UI Action List Field Type

Stan Martin
Kilo Guru

I have a need to add something clickable within a List View in Portal that will run something on the back-side.  Possibly a UI Action.  I have looked into using the undocumented field type of UI Action List.  On my table I created a new text field and using a background script, changed it to UI Action List.  I then found some existing usages of this type of field.  For example in the Workflow Context table (wf_context) there is a use of it.  I mimicked that and created a UI Action and added the sys_id of that UI Action in the Default Value field.  When I open my list view, nothing shows up.  Is this another example of ServiceNow using something that we're not allowed to?  If so, what's my alternative? 

1 ACCEPTED SOLUTION

Aylee Andersen
Kilo Sage

Hi @Stan Martin,

 

I just tried creating a UI Action List field on the Incident table and it worked. Make sure your own UI Action has "List choice" set to true. Also, keep in mind that setting the Default Value of your UI Action List field will only work for new records in the table. Previously existing records won't retroactively have the default value unless the default value was set at the same time the UI Action List field was created. When I first tried my own field, none of the previous records showed any UI Actions, only the newly created records did. So you may need to go back and update that field value on already existing records. If that doesn't work, can you please send a screenshot of your UI Action List field configuration and your UI Action?

 

Incident List with UI Action List Field.png

UI Action.png

UI Action List Field.png

Hope that helps!

- Aylee

View solution in original post

2 REPLIES 2

Aylee Andersen
Kilo Sage

Hi @Stan Martin,

 

I just tried creating a UI Action List field on the Incident table and it worked. Make sure your own UI Action has "List choice" set to true. Also, keep in mind that setting the Default Value of your UI Action List field will only work for new records in the table. Previously existing records won't retroactively have the default value unless the default value was set at the same time the UI Action List field was created. When I first tried my own field, none of the previous records showed any UI Actions, only the newly created records did. So you may need to go back and update that field value on already existing records. If that doesn't work, can you please send a screenshot of your UI Action List field configuration and your UI Action?

 

Incident List with UI Action List Field.png

UI Action.png

UI Action List Field.png

Hope that helps!

- Aylee

Good to know about the new vs existing records thing.  I will retest what I created and see how that goes.