Copy link to clipboard
Copied
Hey Experts,
I am seeking some help with Javascript.
I have three fields in total.
Field A is linked with Field B and C.
If B is blank, field A should populate with Field C total. If C is Blank Field A should populate with B.
I need to submit my assignment tomorrow. Kindly help.
Regards,
Shweta
You may use a custom calculation script for field A with something like this:
if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;
else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;
else event.value ="";
Copy link to clipboard
Copied
Hey Experts,
I am seeking some help with Javascript.
I have three fields in total.
Field A is linked with Field B and C.
If B is blank, field A should populate with Field C total. If C is Blank Field A should populate with B.
I need to submit my assignment tomorrow. Kindly help.
Regards,
Shweta
You may use a custom calculation script for field A with something like this:
if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;
else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;
else event.value ="";
Copy link to clipboard
Copied
You may use a custom calculation script for field A with something like this:
if ( (this.getField("FieldB").value !="") && (this.getField("FieldC").value =="") ) event.value = this.getField("FieldB").value;
else if ( (this.getField("FieldC").value !="") && (this.getField("FieldB").value =="") ) event.value = this.getField("FieldC").value;
else event.value ="";