Jump to content

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

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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.

Posted

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.

This topic is 4342 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.