Author |
|
jbbtex Senior Member
Joined: February 15 2007 Location: United States
Online Status: Offline Posts: 181
|
Posted: November 05 2009 at 12:32 | IP Logged
|
|
|
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 |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 05 2009 at 13:21 | IP Logged
|
|
|
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 |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: November 05 2009 at 13:39 | IP Logged
|
|
|
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 |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 05 2009 at 17:30 | IP Logged
|
|
|
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 |
|
|
jbbtex Senior Member
Joined: February 15 2007 Location: United States
Online Status: Offline Posts: 181
|
Posted: November 05 2009 at 20:28 | IP Logged
|
|
|
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 |
|
|
|
|