- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 01:52 AM
HI Team,
Suppose we have a field 'role' of type glide_list. How can we check the changes values in this.
We cannot use Changes To in when to run condition as it will assume that glide_list has just 1 value and this will not work as a glide_list can have more than 1 values. IF it has suppose 2 value and we add a 3rd one, ChangesTo will not work,
If we add just 1 value and it has no other values then only it will work
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:39 AM
@Community Alums Instead of using Changes To, you should use Changes condition in your BR. You can compare the changes by comparing the current and previous values of the field which you are monitoring for change.
Here is an example.
I created a business rule on the incident table and it only triggers when there are any changes on the watchlist field (a Glide List type field). I show a message on form whenever the watchlist changes.
This BR runs on update and each time when the watchlist changes (user added or removed from watchlist) the BR gets a callback and it shows the messge.
If you wish to compare the current and previous values of the watchlist elements in the script then you can do it by comparing current.watch_list and previous.watch_list.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:39 AM
Hi @Community Alums ,
Please try the below in 'before' update business rule:
(function executeRule(current, previous /*null when async*/) {
var gdListPrev = previous.u_affected_cis.split(','); //change it with your GlideList field backend name
var gdListCurr = current.u_affected_cis.split(','); //change it with your GlideList field backend name
if(gdListCurr != gdListPrev){
//Write your script here
}
})(current, previous);
Please mark this response as correct or helpful if it assisted you with your question.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:43 AM
Hi @Community Alums
your right !
For this you will need to compare the previous and current values onbefore updated business rule you can make use of for loop and indexOf() function to see if the values have changes.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:39 AM
@Community Alums Instead of using Changes To, you should use Changes condition in your BR. You can compare the changes by comparing the current and previous values of the field which you are monitoring for change.
Here is an example.
I created a business rule on the incident table and it only triggers when there are any changes on the watchlist field (a Glide List type field). I show a message on form whenever the watchlist changes.
This BR runs on update and each time when the watchlist changes (user added or removed from watchlist) the BR gets a callback and it shows the messge.
If you wish to compare the current and previous values of the watchlist elements in the script then you can do it by comparing current.watch_list and previous.watch_list.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:39 AM
Hi @Community Alums ,
Please try the below in 'before' update business rule:
(function executeRule(current, previous /*null when async*/) {
var gdListPrev = previous.u_affected_cis.split(','); //change it with your GlideList field backend name
var gdListCurr = current.u_affected_cis.split(','); //change it with your GlideList field backend name
if(gdListCurr != gdListPrev){
//Write your script here
}
})(current, previous);
Please mark this response as correct or helpful if it assisted you with your question.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 02:43 AM
Hi @Community Alums
your right !
For this you will need to compare the previous and current values onbefore updated business rule you can make use of for loop and indexOf() function to see if the values have changes.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....