- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:09 AM
I have an onChange client script where value is getting fetched from script include. I want that the value that is getting from script include to populate in the variable only if it's value starts with OPE.
But this is not updating any value, if I remove the line no 18 it fetches the correct value and sets to the variable
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:49 AM - edited 09-13-2023 07:52 AM
Hi,
You should return the display value of the cost center instead of SYS_ID.
Sample code for your Script Include
gr.getDisplayValue('cost_center');
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:18 AM
Hi,
Can you please put an alert statement before if statement alert(answer.indexOf('OPE')) and give the screenshot.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:24 AM
Here it is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:27 AM
Hi,
Also alert the answer as well, it seems your string does not have OPE.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:47 AM