UI Action Condition has long strings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 11:34 AM
Hello.
A UI action has a condition in which current.u_stage is analyzed against a whole bunch of values. Due to the sheer number of conditions, it was determined that using current.u_stage == 'AAAA' || current.u_stage == 'BBBB' || current.u_stage == 'CCCC' etc wasn't going to cut it due to the character limit on the string field.
The idea that I had was to put the values in an array and use indexOf (current.u_stage) to search for it.
The condition string on the UI Action thus looks like as follows:
(['AAAA', 'BBBB', 'CCCC', 'DDDD', 'EEEE', 'FFFF', 'GGGG', 'HHHH'].indexOf (current.u_stage) > -1)
It doesn't seem to work however. Is there any way to use such a condition (checking to see if a value is in a list of values) to leverage if a UI action is displayed or not? A Script include was considered, but due to my company's restriction on putting in script includes, would prefer solely dealing with this in the Condition field alone.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 11:49 AM
Hi Tahnalos,
You can right click condition field label do configure dictionary & increase the string length & then use the condition that you had to cut & use the other that does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 11:56 AM
I could, but in order to do so requires me to navigate the mess of bureaucracy to have "major system changes" done. Both Script includes, and a modification of "core fields" fall into this category.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 12:37 PM
Try putting the condition into Script portion itself...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2017 12:40 PM
That won't cut it. It would mean that the UI action still appears on the task bar, and I would have to put in additional logic for it not to run when it is not supposed to. The point of the condition field is to make it appear when the logic tells it to.