Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SMGetVariable fails

Featured Replies

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

  • 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]?

  • Author

Ok I can replicate. Emailing you shortly.

It looks like the functionality SMGetVariable is not part of a generated plugin.

  • 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.

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.

  • 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.

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.