When starting a script by using the FMP Protocol the function get(scriptparameter) works, but the content isn't visible in dataviewer, even if the content is set in a variable $sp=get(scriptparameter). Does someone else has the same?
Could you clarify? How have you proved that the function "works" if you can't see its value in the data viewer?
Are you stepping through the script in the debugger or relying on a script step that pauses execution? If you are not pausing somehow, then you should not expect to be able to see a result for Get ( ScriptParameter ) or any local variable because the script never stops long enough to have these values appear, and they are cleared immediately when the script ends!
Thanks for replying. Yes, I've paused and used the debugger.
While renewed testing, I've found the cause. In fmp protocol you can add a script parameter (param=) AND you can add one ore more variables: &$variable1=x&$variable2=y (NO brackets needed even if it's a string!)
This follows from the FileMaker 14 help. I didn't add a scriptparameter (¶m=) but I add a variable, so the variable appeared immediately but there was NO script parameter so get(script parameter) .
Open a file named Clients.fmp12 on the host machine with an IP address of 192.168.10.0 with a script named ListClients, and specify a parameter of TopClients and a local variable $NumberToList with a value of 10:
Retrieving data ...