Ok, first time using sheetworker and I'm struggling finding the right place to start. I'm trying to get the D&D3.5 sheet to auto detect encumbrance load. It currently has the user manually use a dropdown box to select between light medium and heavy. My goal is to use sheetworker to scan current load ranges than use IF statements to find the correct range 'totalcarriedweight' sits in using >=/<= then set the correct dropdown option. Dropdown code: <td><select style="height: 24px; width: 75px; padding: 0px;" name="attr_encumbrload" title="encumbrload (choose the category from above)"> <option value="0.1" data-i18n="light" selected>Light</option> <option value="-3" data-i18n="medium">Medium</option> <option value="-6" data-i18n="heavy">Heavy</option> </select></td> light/medium/heavy load code: <tr> <td><input type="hidden" name="attr_encumbrstr" title="encumbrstr" value="0"> <input class="inputbox" type="text" name="attr_lightloadmax" title="lightloadmax" style="height: 24px; width: 53px; text-align: right;" disabled value="floor(@{encumbrsize}*(floor(@{encumbrstr}/3))*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span> <span data-i18n="or-less">or less</span>.</td> <td><input class="inputbox" type="text" name="attr_medloadmin" title="medloadmin" style="height: 24px; width: 53px; text-align: right;" disabled value="floor(@{encumbrsize}*(floor(@{encumbrstr}/3)*(@{weightscale}))+1)"/>-<input class="inputbox" type="text" name="attr_medloadmax" title="medloadmax" style="height: 24px; width: 53px; text-align: left;" disabled value="floor(@{encumbrsize}*(floor(2*@{encumbrstr}/3))*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span>.</td> <td><input class="inputbox" type="text" name="attr_heavyloadmin" title="heavyloadmin" style="height: 24px; width: 53px; text-align: right;" disabled value="floor(@{encumbrsize}*(floor(2*@{encumbrstr}/3)*(@{weightscale}))+1)"/>-<input class="inputbox" type="text" name="attr_heavyloadmax" title="heavyloadmax" style="height: 24px; width: 53px; text-align: left;" disabled value="floor(@{encumbrsize}*(@{encumbrstr})*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span>.</td> <td><input class="inputbox" type="text" name="attr_liftovermax" title="liftovermax" style="height: 24px; width: 53px; text-align: right;" disabled value="floor(@{encumbrsize}*(@{encumbrstr})*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span> <span data-i18n="or-less">or less</span>.</td> <td><input class="inputbox" type="text" name="attr_liftoffmax" title="liftoffmax" style="height: 24px; width: 53px; text-align: right;" disabled value="floor(@{encumbrsize}*(2*(@{encumbrstr}))*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span> <span data-i18n="or-less">or less</span>.</td> <td><input class="inputbox" type="text" name="attr_pushdragmax" title="pushdragmax" style="height: 24px; width: 58px; text-align: right;" disabled value="floor(@{encumbrsize}*(5*(@{encumbrstr}))*(@{weightscale}))"/><span name="attr_weightunit" title="weightunit"></span> <span data-i18n="or-less">or less</span>.</td> </tr> my first go at the code that I tired copying and changing what I found in this forum. ignore the extra attrs I've been playing around to see if i can get anything to work (it breaks the character sheet) <script type="text/worker"> on("change:totalcarriedweight", function() { getAttrs(["encumbrload","lightloadmax","medloadmin","medloadmax","heavyloadmin","heavyloadmax","totalcarriedweight"], function(values) { const lightloadmax = parseInt(values.lightloadmax) const heavyloadmin = parseInt(values.heavyloadmin) const totalcarriedweight = parseInt(values.totalcarriedweight) const encumbrload = parseInt(values.encumbrload) ///I know I'm messing up here but I don't know the correct way to do it if (totalcarriedweight < lightloadmax) { encumbrload='light'; } else if (totalcarriedweight >= heavyloadmin) { encumbrload='heavy'; } else { encumbrload='medium'; } setAttrs({ attribute: encumbrload }); }); }); </script> I feel like I'm not using the if/else statement correctly. I really have no idea where to start with this thing, particularly with changing the dropdown (light,medium,heavy). Once I can get the basic thing working I know I can run with it, any direction would be appreciated!