Not enough room in ui action condition

ahaz86
Mega Guru

Hey everyone,


So I am trying to add a condition to a ui action but I have run out of character space. I was wondering if anyone has run into this and has a solution other than increasing the size of the condition field.

 

Thanks in advance!

Alex

3 REPLIES 3

jcraneNYC
ServiceNow Employee

You can increase the field size pretty easily. I've done that before on an Inbound Action condition ages ago.


Mark Stanger
Giga Sage

I've had this happen a couple of times.   The solution I used was to create a script include function to contain the condition field logic and return true or false.   Then you just call the script include in your condition field.


mikeblack
Tera Contributor

Hey Hazleet,



I have similar implementation for   one of my client in CMDB.



UI Action Condition :   new CheckingTable(current.getTableName()).tableExists()



Script Include:



gs.include("PrototypeServer");




var CheckingTable = Class.create();




CheckingTable.prototype = {


      initialize: function(tableName) {


  this.tableName = tableName;


      },


  tableExists: function () {


  return this.tableName && gs.tableExists(this.tableName) && ((this.tableName =='cmdb_ci_win_server') || (this.tableName =='cmdb_ci_linux_server' ) || (this.tableName =='cmdb_ci_unix_server' ) ||   (this.tableName =='cmdb_ci_solaris_server' )   || (this.tableName =='cmdb_ci_esx_server' ) || (this.tableName =='cmdb_ci_netware_server' )   || (this.tableName =='cmdb_ci_osx_server' ) || (this.tableName =='cmdb_ci_hpux_server' )) ;


  },




      type: 'CheckingTable'


};



Use the similar logic to get this done.