- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:43 AM
We have an integer field called 'In progress' in the incident form. Every time an incident record is placed In progress state, the integer field needs to be updated by +1.
Any suggestion on it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:50 AM
Hello @Suraj biswal
you should do this using before update business rule:
BR Condition: when the state changes to In progress
Script:
current.integer_field_name = parseInt(current.integer_field_name) + 1;
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:50 AM
Hello @Suraj biswal
you should do this using before update business rule:
BR Condition: when the state changes to In progress
Script:
current.integer_field_name = parseInt(current.integer_field_name) + 1;
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 04:54 AM
Hi @Suraj biswal ,
You can write after insert or update business rule on incident table and condition state changes to In Progress and use below script
(function executeRule(current, previous) {
if (current.state == '2' && previous.state != '2') {
current.u_custom_in_progress_count = (current.u_custom_in_progress_count || 0) + 1;
}
})(current, previous);
Please mark it as solution proposed and helpful if it serves your purpose .
Thanks,
Anand