Does anybody have an IDEAscript to run a macro?
drumond
Offline
Last seen: 5 years 6 months ago
Joined: 02/19/2014 - 06:13
Hi Drumond,
Are you talking about running an IDEAScript from another IDEAScript? If so you can see this thread that has an example on how to do it: http://ideascripting.com/forum/call-script-within-script
Or do you mean something else with macro like an Excel macro?
Brian
Hi Brian
Thanks for your reply.
My question was not complete. Sorry!
What I meant was a sample IDEAscript to define an action field to run a macro.
More specific: What I need to know is the set of parameters for tableField.SetActionFieldForIDEAScript
drumond
Hi Drumond,
I don't know the parameters off hand but I have a script on my home computer that uses this so I will look it up tonight or this weekend and get back toyou.
Brian
Hi Brian,
Thank you very much for your help.
This sample of code works fine. It is just what I was looking for.
Regards
Drumond
Glad I could help.
Hi Brian - I am experimenting for the first time with scripting the action field that will run a macro. I have your script from above that is setting up the action field and it has worked correctly - I now have the action field. I am stuck on how do i get the parameters to pass? The scenario:
The action field is on a table that was created by suymmarizing on EMPLIDs. The EMPLID field is my action field. When the user clicks on an EMPLID on this table i want a different script to run that will basically open the original transaction file, extract all transactions matching that EMPLID then summarizing the activty and charting it. So i only have 1 paramter to pass - it is type AF_FIELD and the field name is "EMPLID" - the rest of the parameters are blank (""). So, in my testing to see if it is working I click on the EMPLID and the script runs to completion but it is not picking up the parameter EMPLID (so it is running the script against all transactions instead of just the ones for that EMPLID). When running a script from within a script the variables that have to be used are arg1, arg2, arg3, and arg4. Are there specific variable for this that have to be used as well? Thanks for any help.
Hi bakerroll,
I have attached an example for you. So in the database you would select define action field, select the IDEAScript to run, in my example it is the Action Field Demo.iss and then in the first parameter go in and select the field, such as the EMPLID. Now when it runs the script arg1 will have the contents of that parameter, and you can either transfer arg1 to another varialbe or use it in your script. The next message will contain the contents of the script, for some strange reason at work I can't mix code with other items, no idea why.
Brian
Thank you for the help, Brian. It is working.
Pages