Work Period Status Start End Entity Button

Hi Guys,

Can you show me how to make the buttons below from the V5 feature thread? I tried everything from adding states, rules and actions but I’m too much of a noob to get it to work.

I’ve tried this: {ENTITY STATE:WPStatus}’==‘WPopen’ and this {SETTING:ISCURRENTWORKPERIODOPEN} but I couldnt get the status to update. Appreciate it and Thanks a bunch!!

You can start with this expression.


This topic contains detailed info about that button but it is currently under V5 Beta category. @QMcKay do we have same info somewhere else? If not maybe we can convert that topic to a V5 Question.

You can set the Caption/Header of an Automation Command programmatically, if you place it on a Custom Entity Screen.

For example, everything outlined in yellow in this screenshot is an Automation Command Button.

The Caption for the Work Period Open/Close button (the big red button in the upper-right) is this:

[='{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? '<block 25,20,25,20 Green>' : '<block 25,20,25,20 Red>']WorkPeriod is<linebreak/><b>[=('{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? 'OPEN' : 'CLOSED')]</b><linebreak/><linebreak/>[=TN('{REPORT TICKET COUNT:(TS.Status=Unpaid)}')>0 ? 'Cannot Close Workperiod<linebreak/>with ' + TN('{REPORT TICKET COUNT:(TS.Status=Unpaid)}') + ' Open Tickets<linebreak/><linebreak/>Click here to see<linebreak/>Open Tickets' : 'Click here to<linebreak/>' + ('{SETTING:ISCURRENTWORKPERIODOPEN}'=='TRUE' ? 'Close' : 'Open') + '<linebreak/>the WorkPeriod']</block>

Here is how it looks when the Work Period is open:

The text and colour is based on the formula. In this case, using Ternary operators, we control what is displayed on the button. Simplified, it looks like this:


###Settings for the button

###Rule to handle button click

###Rule to Start Workperiod

Thank you for the clarification guys. Working great now!!.
Adding End work period and setting value to TRUE works as intended also.
Finally got everything customized to go live. :grin: So happy, thanks a bunch guys! and everyone on this board

Why I don’t see options on WP Ask Question? I see only the “constraint” option…

You didn’t build the action correctly.

I selected action “Ask Question”, but in Rule windows I don’t see options like in screenshot

It is likely that these settings have been “moved” to the ACTION settings

No you did not create the action correctly. He used parameters to build that action to pass the settings to the action from the rule.

I don’t really understand how it works and what I did wrong. Could you explain? Maybe there is a similar example and more detailed instructions?

Start by learning how to use actions. Look up other tutorials.

If you don’t want to help and give a link to the tutorial, why are you writing? Want to make fun of?

Link doesn’t work. Can you send new link to this tutorial?

You are right I do not have to respond. I thought maybe I could help you. I am not in the place to give you step by step I was driving.

I do not make fun of people on the forum. I try to help people every chance I get.

I don’t want “step by step guide” I want to help with one trouble with action. I tried to search in forum, read other guides. But I can’t find it!
BTW, I have previously asked for a tutorial on the syntax of automation, but I was told that this does not exist. And when I ask for help, you send me to a non-existent tutor.
So, pls send to me a tutorial, or write what am I doing wrong?

Pretty much every tutorial written has examples of how to setup and use actions. I can link you all of them if you like?

I do not think there is a tutorial for this post.

I did everything as in other guides and I never had such a problem!
Look. I see that I need to create an “action”. I am creating “WP Ask Question” as “Ask Question”. When I add this “action” to the “rule”, then I cannot add parameters in this window, since there are none. Check out the screenshots. It is impossible to be wrong here.

When I wait for help, I tried to insert parameters, but it doesn’t work too.

You put [:Field Name] in the action and it carries the open field into the action.
The fields in actions can be set within the action or using above placeholder makes the field editable from the rule where it is used.
If action already in use you do need to remove it from rule, save and re add it.
Watch some of my beginners automation video tutorials for better understanding of the basics kf needed.

1 Like

You know how to do as have done it before :wink:

See your amount field in that action…