- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2022 02:19 AM
Hi,
i'm using datalook concept for below field calculation,
ex: when i select dropdown has 1 in the problem Impack, and
when i select dropdown 2 in the Likelyhood i get a score has
2 in Risk Score. has show below .
when i select " none" the fields on the form remains same, how to set empt when we select none.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 07:21 AM
Try this
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
else
{
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 05:47 AM
Hi prasad,
any update on this.?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 07:21 AM
Try this
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
else
{
var Likelyhood=g_form.getValue('u_likelyhood');
if(newValue == '' && Likelyhood=='');
{
g_form.clearValue('u_riskscore');
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 06:01 PM
thank you soo much .its helped a allot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 05:00 PM
Create 2 onChange() client scripts. One for variable u_problem_impact and another for variable u_likelyhood.
u_problem_impact client script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
var likelyhood = g_form.getValue('u_likelyhood');
if (newValue == '' || likelyhood == '') {
g_form.clearValue('u_riskscore');
}
}
u_likelyhood client script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
var impact = g_form.getValue('u_problem_impact');
if (impact == '' || newValue == '') {
g_form.clearValue('u_riskscore');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 06:12 PM
thank you soo much .
its helpful.