Jump to content

Script: Copy Value of Filemaker Field to Online Field


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

Recommended Posts

  • Newbies

Hi All,

 

I'm not sure this is possible, but said I would ask the experts  :)

 

Idea: Clients insurance details need to be validated online. The online system is basic - you enter a policy number, click submit and it returns either valid / expired etc. 

 

Process Needed:

1. Client PolicyID entered into filemaker

2. Button with script to:

  • Copy the contents of the policyID field
  • Go to online website for validating the policy
  • Pastes the PolicyID into the field on the site (uses javascript)

Would appreciate any help on this matter.

 

Many Thanks

 

Oirish

 

 

 

Link to comment
Share on other sites

The answer is, of course it's possible.  In FileMaker (with the right plugins) anything is possible. Now, is it reasonable?  That's another matter.

 

You didn't give details of the website in question other than it uses javascript, which we will sidestep for a moment.

 

Whenever you fill out a web page and submit the information (with or without JavaScript), it creates either a GET or a POST request to the server.  Either of those can be handled with a varying level of difficulty.  To fairly easily find out which is the case, I use the "Live HTTP Headers" extension to Firefox.  Enable it, make your request, and you can see the actual GET/POST traffic between the browser and the server.

 

If your request can be processed as a GET, then all that is necessary is to construct the string and use the FileMaker "Insert from URL" script step. 

As an example, this (assuming appropriate variables are set) will pull a standardized address from the USPS: "https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=0&companyName=&address1="& $address_line1 & "&address2=" & $address_line2 & "&city=" & $address_city & "&state=" & $address_state & "&urbanCode=&postalCode=&zip=" & $address_zip

 

If a POST is required, FileMaker cannot handle that natively, but ScriptMaster (from 360Works) comes with a basic "Post data to URL" script that might be able to fulfill your requirements.

 

After all that, I'll introduce the part that probably complicates things -- you didn't mention whether this site requires authentication prior to requesting the information.  If so, this is a multi-step process, likely requiring cookies.  That's still doable, but I'm not aware of an existing plugin/script which handles cookies. (I am open to being pleasantly surprised if someone lets me know about one).  You could certainly expand on the one in ScriptMaster, as I know there are Java libraries to handle this sort of thing.  It all depends on the amount of time and effort you're willing to invest.

Link to comment
Share on other sites

This topic is 2944 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.