Hey folks! I'm looking for some help with scripting because I'm not proficient enough to work this properly. I know that this works fine: //Autocalc
<input type="hidden" name="attr_max_xy" value="(((@{x} + @{y}) + abs(@{x} - @{y})) / 2)" disabled> I would like to use a script to accomplish the same thing, but I can't quite get it working. This is what I've got: //Sheetworker
on("change:x change:y", function() { getAttrs(["x", "y"], function(values) { setAttrs({ calc_xy: (((parseInt(values.x) + parseInt(values.y) + Math.abs(values.x) - parseInt(values.y))) / 2) }) }); }); What am I doing wrong?