spongebob Posted August 23, 2011 Posted August 23, 2011 Hi, this may sound like a dumb question but on closer inspection it is not. Can I make a button in my client side Filemaker Solution that invokes a Server Side Script -in the same way as if I would execute it in the Server Admin Console- by choosing "Execute Script/Shedule"? My Server Side script imports from an SQL Source into my filemaker. This is setup nicely on the FM Server and works fine (System DSN Set Up). If I could also invoke that via a button in my client solution, I could save myself setting up System DSNs on all client machines who wanto push that button occasionally. So! Is there a way to invoke, with a button in my FM Solution from my FM client, the execution of a Server Side Script? Thanx, Spongebob
bcooney Posted August 23, 2011 Posted August 23, 2011 Have the client set a flag field that the server script checks. So the server script runs periodically, looking for this flag of "queued" requests. How often the server script runs is up to you.
Vaughan Posted August 23, 2011 Posted August 23, 2011 I do this for sending mail: the clients create records in a "mail-to-send" table. A server side script runs every 30 minutes that does the actual sending. This allows the mail to be deleted if sent in error, and it also halves the time that the client waits for the send mail process to complete.
liltbrockie Posted August 24, 2011 Posted August 24, 2011 This is a really weird way of having to do it. Hopefully Filemaker 12 which just give you script step options to say "Run from server"
Vaughan Posted August 24, 2011 Posted August 24, 2011 This would be nice... but thought would need to be give to the security and other implications of this.
bcooney Posted August 24, 2011 Posted August 24, 2011 See this helpful blog post from Zero Blue about server-side scripting.
spongebob Posted August 24, 2011 Author Posted August 24, 2011 This would be nice... but thought would need to be give to the security and other implications of this. Hi Vaughan I agree. Though. As a developer I wish they would leave the security considerations of my development to me. I had a good example where I really wanted to use the "Save a copy as" on a database function on a FM client (so my client could quickly copy a database and send it to me for debugging), and couldnt, because of the imposed security restrictions on that command that I cant override. I know why they exist, just this dbase wasnt security critical. Likewise, if I let an FM client execute a server side script; surely I should decide if I know what Im doing right? I think if we are smart enough to program filemaker, we certainly are smart enough to make those kind of decisions ourselves...but I guess, some folks at FM think we are not smart enough? LOL Thanks for your suggestion. Im worried to "bog down" my server checking for flags all the time; I wish there was a direct way to allow this. Re the helpful blogpost was helpful yes and no. It implies more should be done on the server side, but nowhere do i seem to find a command to do so. Is there such a command? Thanks so much for this most useful discussion I seem to have sparked off... Best Wishes, Spongebob And while Im at complaining... Why are all our avatars streched making us all look Fat or some of us Anarexic? Hmmmm And the search on this forum still needs at least three chars in a word which is seriously restrictive when searching for anything including nearly ALL FM error messages. Since this forum board has changed I have not been able to execute one meaningful search due to this stupid restriction. For example: "Admin console had to close" cant ´be searched because of the word "to". Unfortunately MOST Fm Error messages include a two letter word in the error message. Oh well. I know this is probably not the place for this but I felt depressed and this was a great place to get it off my chest.... not your fault of course! Best Wishes Spongebob ps - I think Ill go visit my friend Patrick now to cheer me up.. he may not be smart, but hes fun!
Vaughan Posted August 24, 2011 Posted August 24, 2011 I had a good example where I really wanted to use the "Save a copy as" on a database function on a FM client (so my client could quickly copy a database and send it to me for debugging), and couldnt, because of the imposed security restrictions on that command that I cant override. Only speculation, but I'd suggest the reason the save a copy as is disabled is because of the caching that FMS employs to improve performance. The backup process is complex because of this.
Wim Decorte Posted August 26, 2011 Posted August 26, 2011 There's a very easy way to do it: create an HTTP URL that uses the XML interface to run the script on FMS, use the OPEN URL script step to fire it.
spongebob Posted August 29, 2011 Author Posted August 29, 2011 There's a very easy way to do it: create an HTTP URL that uses the XML interface to run the script on FMS, use the OPEN URL script step to fire it. Ohhh jaaaa cool! Now, does anyone know that URL?
Recommended Posts
This topic is 4834 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 accountSign in
Already have an account? Sign in here.
Sign In Now