main reason is because the if condition checking the “C” text is inside the if condition checking the null, so it is never executed. This is your code a bit rewritten, you can start with this and debug if you have additional errors function onload(executionContext) { oppForm(executionContext); } function oppForm(executionContext) { var formContext = executionContext.getFormContext(); var optionSetChoice = formContext.getAttribute(“dom_temperature”).getText(); if (optionSetChoice == “C”) { formContext.getControl(“dom_temperature”).setLabel(“Celsius”); } }