Hi,
it doesn't matter which language you use for your request, it will work in both while FormCalc has a slimmer syntax.
FormCalc:
if ($ eq 1) then
Textfield1 = Textfield2
else
Textfield1 = ""
endif
JavaScript:
if (this.rawValue === "1") {
Textfield1.rawValue = Textfield2.rawValue;
} else {
Textfield1.rawValue = "";
}