How set a default value using dictionary entry

Sowmya20
Tera Contributor

I have the variable called Audit, it should be "No" by default. I am trying add the default value using dictionary.

Is there anything I'm missing to add.

find_real_file.png

Thanks.

17 REPLIES 17

Jaspal Singh
Mega Patron
Mega Patron

Hi Sowmya,

 

If its on Variable level then Yes it is correct. Is it not reflecting correctly?

Yes, It is not reflecting correctly.

find_real_file.png

 

In that case it is being overriden by some Client script that runs onLoad(). Give it Client Scripts a check once that runs onLoad() for Catalog Task form.

In begining i have tried clientscript  for setting value as "no" for Audited onLoad.

But after saving the, It's showing again "no" for Audited.

Here is my script:

function onLoad() {
//Type appropriate comment here, and begin script below
var grp = g_form.getValue("assignment_group");


if (grp == '14d1f5446f86a100c80e175e5d3ee4c0') {


g_form.setValue('u_audited', 'no');

} else {
g_form.setDisplay('u_audited', false);
g_form.setDisplay('u_score', false);

}
}