On Change client script not working on integer like I'd expect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 08:31 AM
I'm working on the OnChange client script below, expecting the error message to appear if a user tries to increase the value above 100 from the current value. I'd suspect since it's an integer my If statement would work, but it's not capturing the data as I'd expect. Any help is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:52 AM
Hi @phaug ,
In 10 th line change u_integer with priority sequence field backend name then the field value will update with old value.
After line 10 add below script because when you change priority sequence the error message is fixed after you have done change to the field still error message exit.
g_form.clearMessages();
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:03 AM - edited 11-06-2023 10:06 AM
I figured it out, I had to do this because the commas were breaking it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:22 AM
@phaug Please mark this as helpful if its serves your purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:55 AM
Will this stop a user from changing it from the list view as well? It doesn't look like it does.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:57 PM - edited 11-06-2023 10:29 PM
Hi @phaug ,
Onchange client script will not work on list view so you have to write OnCellEdit client script but it will give alert only so use Before update or insert business rule condition priority changes to achieve your requirement.
Please mark it as solution proposed and helpful it its serves your purpose.
Thanks,
Anand