Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script: Copy Value of Filemaker Field to Online Field

Featured Replies

  • 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

 

 

 

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.

Hi Oirish, and welcome to the FM Forums,,

 

How are the clients accessing the forms?

 

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

 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.