![]() |
Copied an autogen template for the Elk, but the arm/disarm doesnt work now - Printable Version +- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums) +-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3) +--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9) +--- Thread: Copied an autogen template for the Elk, but the arm/disarm doesnt work now (/showthread.php?tid=10608) |
Copied an autogen template for the Elk, but the arm/disarm doesnt work now - ghurty - 06-03-2018 I must be doing something wrong. But cant figure out what. I used the auto generator to generator a keypad for my elk system and it works. I can arm and disarm with it. I copied the button as well as the pop up into a new template. The button goes the pop up to pop up, and it displays the correct current status of the alarm system. So that is all good. But if I try to activate or deactivate the alarm though it nothing happens. I looked at the log server and I get a token expansion failed error (see below). Any suggestions? Thanks Code: 06/03 19:45:53-CQC, CQCWebSrv, CQCRunActionThread340 RE: Copied an autogen template for the Elk, but the arm/disarm doesnt work now - Dean Roddey - 06-03-2018 The auto-gen is setting variables to pass in the selected security system area. The arming mode it sets itself, when you click that. But the area depends on what area it was invoked for, since it could be used for multiple areas. So you can see it says it couldn't expand a token. I'll look at that and see if I can get the name of the token into the message. But the other two come from the arm mode you select and the %(v) is the value you entered into the text widget. If you only need it for one area, replace %(GVar:CfgRoomSecArea) with your actual security area name. Or you could set the variable yourself in the OnPreload of your main template so that you can change it later. BTW, you can view the notes associated with a template, and I think I set up the notes for all of the reuseable type popups to indicate what is required to call them. http://www.charmedquark.com/vb_forum/showthread.php?tid=10002 RE: Copied an autogen template for the Elk, but the arm/disarm doesnt work now - ghurty - 06-03-2018 Thank you. I knew is must be something that I was missing. I had seen the global variables but missed where they were defined. Where on the autogen template would the OnPreload be set on which one of the pages? Thank you RE: Copied an autogen template for the Elk, but the arm/disarm doesnt work now - Dean Roddey - 06-03-2018 IF you only have one security area right now, do it in the PreLoad of your main template just so that it gets set and stays that way. Later, if you need to support more than one, then you can do that, and the popup will be reusable based on the value of the area variable. |