Jump to content

Pass parameter to a server-side script


This topic is 2261 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I want to run a server-side script but don't know how to pass the parameter the script needs to perform. The script need todo the following go to layout, enter in find mode, set field, perform find, set field.

This link says that you can pass information about the client’s context to a server-side script by using the script parameter in the Perform Script On Server script step but I have no idea how, I need to learn how.
can someone guide me please
Thank you

https://www.filemaker.com/help/15/fmp/en/index.html#page/FMP_Help/running-scripts-on-server.html 

Link to comment
Share on other sites

Hi Gilbert,

There's a tiny box when you double-click the script step (Perform Script on Server) called "optional script parameters":

5a834d650cc90_ScreenShot2018-02-13at12_40_59PM.thumb.png.256904b563c0c1b2858763d2e5494fd9.png

 

That is where you need to enter your parameter. It could be a variable ($variable) or just text in quotes.

Don't forget that you can't debug on the server, so you'll want to add error trapping very often and send yourself a mail if something can fail.

Also, you might want to Exit the server script with a parameter, if you need to pass it back to your original script: Exit Script (parameter). And in your original script then you'll have to get that parameter back by: Get (ScriptResult).

Hope this helps,

Agi

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

This topic is 2261 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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