March 12, 201312 yr Newbies I'm attempting to run a script via the browser to open a database and search for a specific record. I'm working from this tutorial: http://www.filemaker.com/12help/html/sharing_data.16.7.html All the script needs to do is find a record with a numerical value in a field called "Studio number", I've created a new script and it currently looks like this: FMP://192.168.1.100/GALLERY%20ARCHIVE.fmp12?script=opieno?val=5008 So... This URL will open the correct file and run the script, but it doesn't enter the parameter and find it. Here's the script (don't think its right yet): Enter Find Mode [Pause] Set Field [specific Pieces::Studio Number = $val] Perform Find[] I'm not entirely sure on how exactly to construct the find script. I'm also not exactly sure how to construct the parameters in the url in order to enter the variables. any help would be great - i'm pretty new to filemaker
March 13, 201312 yr Author Newbies Ok i've now got this working there were a few problems. The 'Pause' bit needed removing (cheers!), the 'Set Field' area was a bit wrong, and crucially i had the URL slightly wrong - I needed a '&' not a '?' before $val. See below Script: Enter Find Mode [] Set Field [specific Pieces::Studio Number; $val] Perform Find [] Heres how i'm making the URL with some PHP to grab the 'Studio Number'. So the script is called findnumber and a field i'm searching within is called Studio Number FMP://192.168.1.100/GALLERY%20ARCHIVE.fmp12?script=findnumber&$val=<?php print $number;?> The confusing thing was constructing the Set Field Area in the script - it seems slightly overly complex and unintuitive. I'm not sure why there are two 'Specify' buttons which have overlapping functions. The way i did this was to set the field i wanted to search within in the first 'Specify' button and entered '$val' in the text area of the second 'Specify' button.
March 13, 201312 yr The confusing thing was constructing the Set Field Area in the script - it seems slightly overly complex and unintuitive. I'm not sure why there are two 'Specify' buttons which have overlapping functions. The way i did this was to set the field i wanted to search within in the first 'Specify' button and entered '$val' in the text area of the second 'Specify' button. It states clearly: "Specify target field" for the top button and "Calculated result" for the bottom one. You entered the values the only possible way. You would have gotten an error if otherwise.
Create an account or sign in to comment