Jump to content

Posting data into FileMaker


Jalz

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

Recommended Posts

Hi Guys,

 

I'm playing around and experimenting with FileMaker so I've got some time to learn new things at the moment. I've setup a form in the webviewer and the form has a submit button, which currently uses the post method to a php page which then populates my FileMaker database using the the FileMaker API for PHP.

 

I've recently discovered from posts regarding the fmp url. I've done some searching, it looks like with this technique you can open files, trigger scripts etc in FileMaker outside or inside the application. I'm wondering whether I can somehow from my form in a webviewer, post (using the fmp url method) to a scriptmaker script and do all my manipulation in FileMaker therefore bypassing the php page?

 

Would the fmpurl be suitable for something like this and could I invoke it simply putting in the path to the fmp url in the action attribute of the form tag?

 

Thanks

 

Jalz

Link to comment
Share on other sites

It would work.  The main difference is that with your PHP page you are letting FMS take care of setting the data, not the client.  So that process runs asynchronously from what the client is doing after the request has been sent to the PHP page.

 

With the FMP url you are asking the client to take care of it so you'll have to wait for that to finish  So it depends on what it is you want to do.

Link to comment
Share on other sites

Thanks Wim for replying. I've got the webviewer to trigger a script using the form post. What I haven't managed to do is actually receive data from a field. I'm not too worried about the encoding as I know I can do that in FM - I just want to see if i can transfer the data from the "name" input field to a dialog I have in my FM Script. I've found various samples online and understand I have to use the 'param' in my url, am I right in thinking javascript is the only method to combine the post data, or can the 'native' form post be read directly in FileMaker? What I'm trying to say is, is there a command equivalent to $_REQUEST['name'];

Link to comment
Share on other sites

or can the 'native' form post be read directly in FileMaker?

 

The only way you can get FM to do anything from inside the web viewer is by triggering an fmp url, if your script needs to work with data that only exists in your web viewer you have to pass it along as a script parameter.

Link to comment
Share on other sites

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