I want to simplify a lot of long case scripting, by having a script call to perform another script based on a script name being in a field.
Example:
(this is for a process checklist)
Portal whose records include fields "NextStep" and "NextStepScript".
Portal rows each have a button.
When pressed, the field "NextStep" would determine if the script would just mark the portal row "complete" and be done, or if it would mark it complete and then run another script. If the first field told the script to mark complete and then "run another script", it would look to the NextStepScript field to determine which script to run.
I can't find a way to call out scripts by name in a calc.
?
Call script by name determined by calc
9 posts
• Page 1 of 1
|
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Neither can I. There are plugins that will run a script by scriptname, however, including the FM Example plugin that comes with FileMaker Advanced. John Sindelar
SeedCode |
|
I have Advanced, but not sure what "included" plug in you're talking about...
Where do I find that bad boy? I assume there is a specific function that does this...what is the name? N8 |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
It's in...
FileMaker Pro 8 Advanced / Plugin Examples / FMI ...I'm not sure if you have to grab that from the CD or if it installs with the ap. The command you're looking for is: XMpl_StartScript( filename; scriptname ) Last edited by John Sindelar on Tue Mar 20, 2007 9:26 am, edited 1 time in total.
John Sindelar
SeedCode |
|
SWEET SWEET SWEET
I had to grab it off my disk...thanks, John. That is going to be SUCH a useful tool, and save so much programming time by allowing the end user to manipulate what scripts get triggered based on layman term value lists (with scripts named the same, obviously). Now, the only thing that would make this even sweeter is if you could have a Value List that showed the names of your scripts. |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
ScriptNames ( fileName ) should probably be unstored, but set that to a stored text field and you can use that field as your value list. John Sindelar
SeedCode |
|
My day just got even better...
So, what if I wanted to just show the scripts that start with "GoTo_"? Did a little research on the Filter functions, but couldn't figure out how to make that work... I sure hope someone else is learning from this too. There's a lot of potential with these few little tricks... |
Posts: 1
Joined: Tue Mar 20, 2007 9:14 am |
Does anyone know of a link of where I can see an example of how to use this?
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
I don't, unfortunately. The plugin example is designed to help folks write plugins, but the function most people are interested in is the one that runs a script by script name. The function is pretty straightforward:
XMpl_StartScript( filename; scriptname ) John Sindelar
SeedCode |
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests