"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: "red"
}
}
end;
"Determination of the button's visibility";
this.Count >= 0