- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2019 02:25 AM
Hi,
I want to see i3 as cpu selected and "total estimation cost is 300" in total_estimated_cost column if i select the choice as i3 in CPU field.
I want to use onChange client script to do this.
Here i have made:
Record producer: Estimation RP
Mutli row variable set: Disc size
pls help
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2019 02:43 AM
Hi there,
Not quite understand your requirement of why to do this. Though it is possible to onLoad and also onChange outside the MRVS, to fill rows in the MRVS.
Look at example script below. Obviously, you have to change the variable names, mrvs name. Maybe you also have to do something with labels/values. Though basic script works (= tested).
function onChange(control, oldValue, newValue, isLoading) {
if(isLoading || newValue == '') {
return;
}
var rowObj = [];
rowObj.push(
{
"actions": "",
"mrvs_variable_1": g_form.getValue('name_of_variable_you_are_trying_push')
}
);
g_form.setValue('name_of_your_mrvs', JSON.stringify(rowObj));
}
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2019 01:09 PM
Hi Mark,
Lets take the number is a reference field, when you select the number reference field is 123 the cart should be yes by using onChange client script. Please let me know the details of scripting.
Number is Reference field
Cart is single line text.
Thanks,
Mahesh R