29
Jeremiah Hammond Senior Technical Project Lead https://www.dbservices.com FMP URLS

Filemaker FMP URLs

Embed Size (px)

Citation preview

Page 1: Filemaker FMP URLs

Jeremiah HammondSenior Technical Project Leadhttps://www.dbservices.com

FMP URLS

Page 2: Filemaker FMP URLs

Questions

If you have a question, please typist it into the console. If we

don’t get to your question, please send it to [email protected]

Page 3: Filemaker FMP URLs

Agenda

What’s an FMP URL?Structure of FMP URLsUnlocking the Potential of Web ViewersDemosAdditional Resources

Page 4: Filemaker FMP URLs

About DB Services

•We are a team of analysts, developers, and designers creating custom applications to make your organization more effective and efficient. Learn more about our FileMaker services on our website.

•If you leave this presentation wanting learn more! Check out our FileMaker Blog where we post new content each month.

•To learn more about DB Services, check out our website at www.dbservices.com

Page 5: Filemaker FMP URLs

Background

Work

Read more on me on our website, https://www.dbservices.com/, in the About section

• Member of FM Academy• Article included in FM Newsletter• Global presence (Canada, Europe,

Africa)• Team focused on adding value

• Tech Lead at DB Services• Certified in 15, 14, 13, 12, 11, 10• Working in the FileMaker industry

for over 8 years• Sponsor at FileMaker Developer

Conference

Page 6: Filemaker FMP URLs

About You

Have you ever used an FMP URL to build a feature in a FileMaker

system?

Page 7: Filemaker FMP URLs

What’s an FMP URL?

Page 8: Filemaker FMP URLs

What’s so special about FMP URLs anyway?

+ =FMP URL

Magic Hat Image from http://files.softicons.com/download/web-icons/magic-people-icons-by-dapino/png/256x256/magic_hat.png

Page 9: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

Page 10: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://

Page 11: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:ifdg4Life@

Account Password

Page 12: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:[email protected]

Account Password IP Address

Page 13: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:[email protected]/Invoices.fmp12

Account Password IP Address File Name

Page 14: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:[email protected]/Invoices.fmp12?script=HelloIFDG

Script

Page 15: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:[email protected]/Invoices.fmp12?script=HelloIFDG&param=abc

Script Script Parameter

Page 16: Filemaker FMP URLs

Structure of an FMP URL

fmp://[[account:password@]netaddress]/databasename[?script=scriptname[&param=scriptparameter]

[&$variablename=value]]

fmp://JohnDoe:[email protected]/Invoices.fmp12?script=HelloIFDG&param=abc&$showExtraDialog=1&$

extraDialogMessage=Hiya

Variable 2

Variable 1

Page 17: Filemaker FMP URLs

Special Placeholders for IP Address

~ fmp://~/Invoices.fmp12?script=HelloIFDG

$ fmp://$/Invoices.fmp12?script=HelloIFDG

* fmp://*/Invoices.fmp12?script=HelloIFDG

Page 18: Filemaker FMP URLs

Best Practices

URL Encoding

Dynamically generating file and script names

Page 19: Filemaker FMP URLs

The Essentials

To recap, there’re only three required components to an FMP URL: fmp://, IP address, and file name (no ext)

fmp://127.0.0.1/Invoices

This is a valid FMP URL

Everything else is optional

Page 20: Filemaker FMP URLs

Unlocking the Potential of Web Viewers

Image from http://img3.wikia.nocookie.net/__cb20140903193524/computerscience/images/c/ce/Javascript_logo_unofficial-300x300.png

FMP URL+

Page 21: Filemaker FMP URLs

Calling the FMP URL in Javascript

Self.Location or Window.Location

Page 23: Filemaker FMP URLs

Getting Javascript Files into a Web Viewer

Page 24: Filemaker FMP URLs

Some Things to Keep in Mind

FMP URL script is asynchronous

Embedding Javascript in FileMaker calc = hard to read

URL encode on the Javascript side

There’s a way around the 2048 character limitation on Windows

Web viewers can’t be used everywhere

Page 25: Filemaker FMP URLs

Takeaways

The world of Javascript is at your disposal

Can solve problems that were previously not possible without a plugin

Must have some comfort with web languages

Keep as much of the business logic in FileMaker as possible

Page 26: Filemaker FMP URLs

Additional Resources

Page 27: Filemaker FMP URLs

Starting Points

A collection of FMP URL, Web Viewer and Data URL examples

http://blog.jsfmp.com/post/95206822956/collection-of-fmp-url-web-viewer-data-url-examples

Page 28: Filemaker FMP URLs

Limitation Info & Workarounds

Browser URL Length Restrictionshttp://www.boutell.com/newfaq/misc/urllength.html

The FileMaker Web Viewer as a Javascript Calculation Engine (Workaround to Character Limitation on Windows)http://www.seedcode.com/filemaker-webviewer-javascript-calculation-engine/

Page 29: Filemaker FMP URLs

Web UI Controls & JS Libraries

Native Web 2.0 Controls in FM 12Layoutshttp://buzz.beezwax.net/2012/04/21/native-web-2-0-controls-in-filemaker-12-layouts

jQuery Demo Sitehttp://jqueryui.com/menu/