There are various ways to trigger a script from a global field such as script triggers. But you don't have something like "Perform Script by Name" so that the calculation chooses the script. We have this in the "Set Field by Name", but it does not exist for "Perform Script". So what you have to do is have a script run that lists all the possible scripts and have it look at the global field and excute scripts based on whether the Global Field equals a script name. So you would have script that would have :
If [ globalfield = "Script1" ]
Perform Script [Script1]
Else If [ globalfield = "Script2" ]
Perform Script [Script2] ;
Else If [ globalfield = "Script3" ]
Perform Script [Script3]
Ooops, spoke too soon and forgot about this. You can get a list of all Script Names by this calculation:
ScriptNames ( Get ( FileName ) )
Thanks !! i been using that !! Specifically for avoiding if Statements .
so you see... i do not store scripts in globals but right along side my solution.
ok .. sir .... so i did post this to the forum .. see..
" Perform Scripts From A Field Avoid IF Statements part II "
rob 'jesus Land Tidd' lewis
Structures From Silence — Earths Dynamic Air Waves Changes All
There is no such function as "Perform Script" where you can have it perform a function based on an input value in a field, global field or calculation. "Perform Script" functions have to have the script preselected in the script step. So the answer to your question is that you can't do it the way you are asking.
If all the commands within the script are web compatible, and the solution is hosted with CWP enabled, you could dynamically launch scripts by name through a web link. Chances are, the OP is looking for a system-wide solution and this method wouldn't work, but in limited instances it could be used.