"Declaration of the onUpdate function that customizes the button"
function onUpdate(buttonValues : any) do
let count := this.Count;
{
caption: if count > 0 then "Send (" + count + ")" else "Send" end;
tooltip: "Click to send your request",
buttonColor: if count > 0 then "red" else "blue" end;
badge: {
caption: if count > 0 then text(count) else "" end;
color: "#ffffff"
}
}
end;
"Determination of the button's visibility"
if this.Count >= 0 then
true
else
false
end