December 27, 201114 yr I am sure i am just doing it wrong. My script has two output variables, result and resultCode. I am calling my script as an external function. When I attempt to access these variables I get this error: 12/27/11 1:45:36 PM [0x0-0x671671].com.filemaker.client.pro[21838] SEVERE: PluginFunction PluginFunction{name='SMGetVariable', functionID=-28360, minArgs=null, maxArgs=1} got an error with converted args [resultCode] 12/27/11 1:45:36 PM [0x0-0x671671].com.filemaker.client.pro[21838] java.lang.IllegalStateException: You can only get ScriptMaster variables after evaluating a script, and before setting any new variables. The FMP scripting looks like this: Set Variable [ $customerResult;Value:CreateAuthorizeNetClient( $customer ) ] Set Variable [ $result , SMGetVariable( "result") ] I am not explicitly calling EvaluateGroovy but I assumed that using the Set Variable methodology on my java would still allow me to access the output variables. The script works and in the Scriptmaster tools the output vars are populated as expected. This is probably embarrassingly simple I sure hope so! Tx
December 31, 201114 yr Author In the process of trying to put a demo video together it seems to work properly now.. I rebooted the other day so maybe 'something' flushed out. Anyhow, all seems well now. If this reoccurs I'll ping you via email. Thanks Brent! John- Can you send the FM file you are using to [email protected]?
January 3, 201214 yr It looks like the functionality SMGetVariable is not part of a generated plugin.
January 6, 201213 yr Author Thats exactly it. A workaround is to return an array out of my plugin function. This array is automatically transformed into a delimited list which can be dealt with.
January 6, 201213 yr John, I thought we were communicating with you by email. We were able to add the SMGetVariable function to generated plugins. If you need it let me know (email preferably) and it will also be added to the next release of ScriptMaster.
January 9, 201213 yr Author Absolutely, i was replying but trying not to let the cat out of the bag until you released it Yes, it works now and yes it is FULL OF AWESOME. Thanks guys John- John, I thought we were communicating with you by email. We were able to add the SMGetVariable function to generated plugins. If you need it let me know (email preferably) and it will also be added to the next release of ScriptMaster.
January 10, 201213 yr Ok. Thanks for being discreet John. I'll follow suit and "not let the cat out the bag" myself but suffice it to say we are about to release a new version of ScriptMaster. It will include not only this feature but also something forum posters have been requesting for a while. Stay tuned...
Create an account or sign in to comment