- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2014 09:27 AM
I know this might sound crazy, but, currently I am having issues with a long condition I need on a business rule, and the current size of the field (254) is not attending my needs. Do anyone knows of any impact of changing this size to maybe 400 ?
What I need to know in summary is, if I change the size, will it continue to work as usual?
Thanks and regards,
Felipe
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2014 11:54 AM
Hi,
So there are two ways:-
1. Best practice of ServiceNow is to write a script include and call it in the condition. The Script include will do all your calculations and return true or false. This way you do need to update the OOB feature i.e. length in your case & so you will not have any upgrade issues in near future.
2. If you still want to go with the same, then you can surely increase it, but remember that it will not be updated by the Upgrade process when you do an upgrade form your current version to the version out by ServiceNow.
Thanks
Ashish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2014 10:28 AM
We made our condition field larger, and it still works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2014 11:18 AM
Hi, thanks for your reply. What ´s the field size currently working on your instances?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2014 12:07 PM
512
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2014 12:33 PM
You don't have to put your conditions into the condition field.
You can put it all on the first line of your business rule:
Condition: <blank>
Script:
if(<all the long conditions go here> == 1) {
//rest of script
}
This isn't the best because the BR will run always, so what I've done with long conditions is break the important ones out into the condition field, and the less important ones into an if statement on the first line of the script:
Condition: current.field == 1 && current.whatever != 7
Script:
if(<less important condition> > 0) {
//rest of script
}