I am converting nintex form to Power model driven apps, i am trying to use the javascript if fil the color of control.
function BillingGridContractRate(executionContext) {
var formContext = executionContext.getFormContext();
var ContractRate= formContext.getAttribute("corampb_contractrate").getValue();
if(ContractRate=true)
{
alert("yellow");
formContext.getAttribute("corampb_contractrate").style.backgroundColor="Yellow";
}
else
{
alert("gray");
formContext.getAttribute("corampb_contractrate").style.backgroundColor="Gray";}
}
Error: Cannot set properties of undefined (setting 'backgroundColor')

Report
All responses (
Answers (