Client script not working in Agent workspace but works in Platform view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2022 07:09 PM
I have a issue where the onChange script that I am using is trying to find a difference between two fields and populates the value in the third field. It is working in the Platform view but is not working on the agent workspace. Below is the onChange script logic that I have that is working fine in the platform view but not in agent workspace.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var amt = parseInt(g_form.getValue('amt1').substring(4)) - parseInt(g_form.getValue('amt2').substring(4));
g_form.setValue('amt3', 'USD;'+amt);
}
So here we are taking the difference between amt1 and amt2 and setting it to amt3. Not sure why this is not working in agent workspace.
I am getting a negative value of what we enter in amt2 field as a result in amt3 field instead of the different between amt1 and amt2 fields.
Any inputs would be appreciated. Thank you!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2023 12:47 PM
Did you manage to resolve the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 03:34 AM
Hi was there any resolution here, we still facing the same issue in our workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 09:15 AM
Select UI Type "All" on client script. It worked for me on both Native and Workspace.