#143316 - 2005-07-10 12:15 PM
setting logon hours for a group
|
briannz556
Getting the hang of it
Registered: 2002-05-03
Posts: 64
Loc: new zealand
|
Hi There I'm putting together a kixform that sets allow/deny logon hours for a group of students in AD.
I need to be able to cycle through 25 checkboxes on a kixform and action a function call whenever a checkbox is ticked. The boxes are named $CheckBox1 to $CheckBox25. Is it possible to convert a string into a variable name? If so, how?
For example, it would be nice to be able to do:
Code:
for $day = 1 to 5 for $period = 1 to 5 if somefunction('$$' + 'CheckBox' + Val(5*$day + $period - 5) +'.value') <> '' action() endif next next
But I'm not sure if "somefunction" exists or even if this is possible?
Can someone offer any ideas?
Cheers
|
Top
|
|
|
|
#143321 - 2005-07-10 05:28 PM
Re: setting logon hours for a group
|
maciep
Korg Regular
Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
|
check out the Execute() Function
For example (not tested at all) Code:
for $j = 1 to 25 $ = Execute("$$checked = $$Checkbox" + $j + ".Checked") if $checked ? "Checkbox" + $j + " is checked" else ? "Checkbox" + $j + " is not checked" endif next
|
Top
|
|
|
|
#143323 - 2005-07-10 06:20 PM
Re: setting logon hours for a group
|
maciep
Korg Regular
Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
|
a safe distance away
|
Top
|
|
|
|
#143325 - 2005-07-11 12:45 AM
Re: setting logon hours for a group
|
briannz556
Getting the hang of it
Registered: 2002-05-03
Posts: 64
Loc: new zealand
|
Thanks for that Maciep (and Lonkero for correction). Just what i didn't know and works as required.
As to Les's comment, I was trying to show what the construct was that i wanted NOT the exact use for the construct. Sorry if it fazed you.
Appreciate all the excellent thoughts.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 557 anonymous users online.
|
|
|