Page 1 of 1
Card Question
Posted: Mon Nov 10, 2008 7:57 pm
by warrenk
What would be the best way to "refresh" a card? I have a card where I am updating dropdown fields from a SQL database. When a update is done, I want to rerun the "on opencard" function which contains the statements to load my dropdown fields. Should I just close and reopen the card or can I specify a call to the "on opencard" function?
Hope I am making sense.
Warren
Posted: Mon Nov 10, 2008 8:31 pm
by Mark
Hi Warren,
You can make a new handler, which contains the entire openCard handler, but with a different name. Call this handler from the openCard handler and from the handler that is supposed to refresh the card. There is no need to go to a different card and back.
Best,
Mark
Posted: Mon Nov 10, 2008 9:17 pm
by warrenk
Mark,
Would this be a function I create?
ie.
on opencard
call RefreshCard
end opencard
function RefreshCard
(enter code)
end RefreshCard
Thanks for your help!
Warren
Posted: Mon Nov 10, 2008 9:19 pm
by Mark
Hi Warren,
No, not like that. This would be a handler of the form
Code: Select all
on handlerName
-- do something here
end handlerName
You can call it, simply by issueing the command. You don't need to use the call command.
Best,
Mark
Posted: Mon Nov 10, 2008 9:39 pm
by warrenk
Mark,
Thanks...this works. Appreciate the help!
Warren