For your sample, you can create two customized service, named ServiceYes and ServiceNo, with boolean output. Yes/No will be both services's input.
ServiceYes bound with button A's visible attribute and ServiceNo bound with button B's visible.
For ServiceYes, once the input is yes, return yes, if the input is no, return false.
For ServiceNo, once the input is yes, return falus, if the input is no, return yes.
After input is decided, use some event to trigger both service. Button will show up or invisible.
If you need step to step guide, just feel free to let me know.
thank you for fast answer
Is possible to make decision base on model widget parameter "sequence"?
I tried to write function in Home.js which make this decision immediately after start.
This function should read value from parameter sequence I don't know the correct syntax. Then IF - ELSE will make decision based on sequence value.
I tried something like:
setWidgetProp( 'visibility', 'visible', true);
setWidgetProp( 'sequence', 'visible', true);
I solved it today. Function decide base on model widget parameter steps which is undefined when model has not a sequence (otherwise parameter is a number).
var pom = $scope.view.wdg['model-1']['steps'];
var ButtonA = false;
var ButtonB = false;
ButtonB = true;
ButtonA = true;
The function is started when thingmak is tracked.