Newbies aliopie Posted March 12, 2013 Newbies Posted March 12, 2013 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
dansmith65 Posted March 12, 2013 Posted March 12, 2013 un-check the "Pause" option for the "Enter Find Mode" step.
Newbies aliopie Posted March 13, 2013 Author Newbies Posted March 13, 2013 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.
hbrendel Posted March 13, 2013 Posted March 13, 2013 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.
Recommended Posts
This topic is 4546 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