Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: ph_createtimedevent1 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: November 05 2009 at 12:32 | IP Logged Quote jbbtex

I'm trying to create a timed event that uses a GV in the boolean field.

If I put {MYGLOBAL} in as the boolean of the ph_createtimedevent1 formula, {MYBLOBAL} gets evaluated and in the Timed Event listing the boolean field contains the value of {MYGLOBAL} rather than the string {MYGLOBAL}.

Any ideas on a work around?

__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: November 05 2009 at 13:21 | IP Logged Quote grif091

Try putting the Global variable name in quotes. The following example creates a Timed Event that fires 1 minute after being created. If GBOOLEAN1 is set to 1 the Macro is executed 1 minute later. If GBOOLEAN1 is set to 0 the Macro is not executed. If the quotes do not work post the actual ph_createtimedevent1 statement.

ph_createtimedevent1("NowPlus1",1,0,0,1,1,DATETIME(TODAY(),N OW()),0,"MMESSAGE1","{GBOOLEAN1}")

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: November 05 2009 at 13:39 | IP Logged Quote grif091

I may not have understood your original question. If you are looking for a method to have the Global variable evaluated at the time the Timed Event fires rather than when the Timed Event is created use the following...

ph_createtimedevent1("NowPlus1",1,0,0,1,1,DATETIME(TODAY(),N OW()),0,"MMESSAGE1","ph_getglobal_s('GBOOLEAN1')")

Edited by grif091 - November 05 2009 at 13:44


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: November 05 2009 at 17:30 | IP Logged Quote dhoward

Heh, I think he's looking for something like this:

ph_createtimedevent1("NowPlus1",1,0,0,1,1,DATETIME(TODAY(),N OW()),0,"MMESSAGE1","{" + "GBOOLEAN1" + "}")

This should actually insert the global variable into the boolean field without evaluating it.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: November 05 2009 at 20:28 | IP Logged Quote jbbtex

Dave,

That's it, exactly. Thanks.

__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum