# How to use Constrain for paid ticket permission?

**URL:** <https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740>\
**Category:** V5 Question\
**Created:** [May 1, 2017, 6:28pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740 "2017-05-01T18:28:15Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![RickH](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rickh/32/51960_2.png) [@RickH](https://forum.sambapos.com/u/RickH)\
**Post date:** [May 4, 2017, 12:19pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/21 "2017-05-04T12:19:53Z")

</div>

Just put No=No of you dont have a comand value for No all that will happen when you press no is the ask question box will disappear

---

<div class="post-metadata">

**Author:** ![Manuel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@Manuel](https://forum.sambapos.com/u/Manuel)\
**Post date:** [May 4, 2017, 12:27pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/22 "2017-05-04T12:27:39Z")

</div>

hi @JTRTech  
here is the rule

![](https://forum.sambapos.com/uploads/default/original/3X/f/3/f38e819d3b9557187a0846451729271ca5305004.PNG)

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [May 4, 2017, 1:01pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/23 "2017-05-04T13:01:51Z")

</div>

No the rule with constraint of automation command name = ‘Rechung drucken’

---

<div class="post-metadata">

**Author:** ![Manuel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@Manuel](https://forum.sambapos.com/u/Manuel)\
**Post date:** [May 4, 2017, 1:04pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/24 "2017-05-04T13:04:43Z")

</div>

ah thats the simple print bill rule

![](https://forum.sambapos.com/uploads/default/original/3X/5/c/5cea4ad26d50e59ef4805aae8af88fc18a8a8486.PNG)

so i think it not makes diference if its this rule or another i used this rule only for testing…

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [May 4, 2017, 2:13pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/25 "2017-05-04T14:13:27Z")

</div>

the ask question triggers this rule via the automation command name.  
If you want it to use the buttons you need to add comand value constraint to this rule.  
either value = yes or does not = no.  
Since it is only a yes no you can use either, if it was multi choice ask question you would want to to does = and not have a rule where command value = no

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [May 4, 2017, 2:55pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/26 "2017-05-04T14:55:44Z")

</div>

The Ask Question Action fires an Automation Command (ie. **Print Bill** ) and passes the value of the clicked Button as the `[:CommandValue]` (ie. **Yes** or **Cancel** ).

The Command Values have no special meaning - they are arbitrary. That is, the word “ **Yes** ” and “ **Cancel** ” have no special function. They are simply words/values. They could be **blah123** and **fluffy57** , and those words become the `[:CommandValue]` that is passed to the AMC when “Si” or “No” buttons are clicked, respectively.

```auto
buttonCaption1=CommandValue1,buttonCaption2=CommandValue2,buttonCaption3=CommandValue3
Si=Yes,No=Cancel
Si=blah123,No=fluffy57
Si,No ... if no CommandValue is specified, then the CommandValue becomes the button caption word
Si=Si,No=No ... effectively the same as above

```

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/3/d3283298c69e1bc0d756350d05dd68fbc33d78cf.png)

* * *

The Rule for the AMC Name which is triggered from the Ask Question Action should have a Command Value Constraint.

The `[:CommandValue]` that is passed from the Ask Question Action will be **Yes** or **Cancel** (or **blah123** or **fluffy57** ), depending on which button was clicked.

We can use that `[:CommandValue]` here to constrain this Rule, so that this Rule will only fire when the `[:CommandValue]` is **Yes** (or **blah123** )… or whatever.

 ![](https://forum.sambapos.com/uploads/default/original/3X/6/e/6e281b9646b9f12087c43762faff3c4ed19f28ff.png)

---

<div class="post-metadata">

**Author:** ![Manuel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@Manuel](https://forum.sambapos.com/u/Manuel)\
**Post date:** [May 4, 2017, 3:03pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/27 "2017-05-04T15:03:57Z")

</div>

Yeah that works thank you now i understand… 👍

---

<div class="post-metadata">

**Author:** ![Manuel](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@Manuel](https://forum.sambapos.com/u/Manuel)\
**Post date:** [May 4, 2017, 3:06pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/28 "2017-05-04T15:06:35Z")

</div>

thanks for the help you all!

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [May 4, 2017, 7:17pm UTC](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740/29 "2017-05-04T19:17:29Z")

</div>

If you want a video tutorial i did one for show change message with option print copy of receipt;

> [@Basic Automation Tutorial Video for Show Change Message \[HD with Voiceover\]](https://forum.sambapos.com/t/basic-automation-tutorial-video-for-show-change-message-hd-with-voiceover/11249):
>
> Basic Automation Tutorial Video for Show Change Message (Ask Question) Ideal Practice Flow for Newbies So to follow the last video tutorial please find below a video tutorial for adding a Show Change message using Ask Question action prompt. Brief description of Ask Question action and its fields. Also covers little more on generic actions with ‘carried fields’. Previous Video: Basic Automation Tutorial Video for Simple Fast Cash Buttons Did you find this video useful? To ga…

[Previous page](https://forum.sambapos.com/t/how-to-use-constrain-for-paid-ticket-permission/14740.md?page=1)
