Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Copied an autogen template for the Elk, but the arm/disarm doesnt work now
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?


06/03 19:45:53-CQC, CQCWebSrv, CQCRunActionThread340
   CQCKit, CQCKit_ThisFacility.cpp.634, Failed/Data Format, Error: 6257/0/0
   Token expansion failed during command processing
   ArmArea : %(GVar:CfgRoomSecArea), %(GVar:ArmMode), \%(v)
     <CQCWebSrv> CQCIntfEng_ActEngine.cpp - 689
     <CQCWebSrv> CQCIntfEng_View.cpp - 6055
     <CQCWebSrv> CQCIntfEng_View.cpp - 3136
     <CQCWebSrv> CIDCtrls_GestHandler.cpp - 396

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.
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
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.