Thursday, March 8, 2018

Troubleshooting Error Code 802 and FileMaker Go Bug - Update

Error Code 802: Unable to Open File


While helping develop a FileMaker Go solution recently, we hit an unexpected snag (is there any other kind?) late in development cycle.  Our stand alone solution is designed to automatically connect to a FileMaker Server to get updated information on a routine basis every time it starts up. Since our clients are not always able to connect to the internet, we have code to allow them to safely bypass the check-in if that is the case.

Towards the end of the development cycle, we activated the code to make the call, and started testing.  And immediately ran into problems:  FileMaker Go version 15 connected right away.  FileMaker Go 16 connected with one user, but not another user.  Both were using the same beta version of the software, both had the same version of FileMaker Go:  v 16.0.4.   One of the first steps in troubleshooting is to add error capture code in order to see what is going wrong,  We did that, and were rewarded with error code 802:  Unable to open file.  Which is something we knew, of course.  But why could one user open it and not another?

The Search Begins


So I looked for some help on the internet and found that error code 802 had been puzzling people going back to 2004, and there were a variety of causes:
  • Permission errors

  • Database source not open on the server

  • No reason, just happens occasionally

  • Inaccurate database relationships

  • FileMaker server bug

  • DSN managers trying to setup a connection via ODBC

  • Overloaded server


The list went on, and every solution identified did not apply to our situation.  The server file was present and available on the server to FileMaker Go users, and was accessible by using Open Remote directly from FileMaker Pro client, as well as FileMaker Go 15 (a requirement for this project).

For the record, our setup is pertty straight forward:  The FileMaker 16 server is housed on an AWS (Amazon Web Services) server, and is the limited developer version allowing one concurrent hookup.  Only one user was connecting (and immediately disconnecting after running a short script) at a time, so too many concurrent connections was not the problem.

After thinking about FileMaker 16 differences from earlier platforms, a thought occurred:  This might be a security problem with FileMaker 16's new, rigid SSL requirements.  I checked, and our temporary FileMaker SSL certificate, issued by the FileMaker Server for development purposes, had expired.  Every time a new user tried to connect to the server with FileMaker Go 16, the server threw a popup warning that the connection to the database on the server was not secure.  During a normal connection via FileMaker client, this is not a problem, as the user can click the button to proceed.  When logging on via a script, however, this option was not available, and the file would not open - Error 802.

Problem solved


We were able to connect every user by simply adding a Host entry with the IP address to the iPad – when a user adds the host, the security warning shows up during the process and the user can permanently add the server to the approved list.  Short term, that works out.  I later added an SSL certificate to the server, solving the problem in the long term.  And a valid SSL Certificate is something necessary for almost all FileMaker Server installs with containing sensitive data (the exclusions include local servers inside a secure firewall).

So add one more option to Error Code 802:  Unable to open file via script due to SSL Certificate requirements with FileMaker 16.


FileMaker Go Bug - UPDATE


I reported what I suspected was a FileMaker Go bug on Monday here.  It turns out to be the real deal:
Thank you for your posts and movie file.  I am able to reproduce the issue with FileMaker Go 16.0.4 under iOS 11.2.6 using an iPad Pro.  I have sent all information, including a sample file, to our Development and Testing departments for review.  When I receive any feedback, I will let you know.

TSGal

FileMaker, Inc.

Hopefully, it will be patched soon.

Monday, March 5, 2018

FileMaker Go Bug?

FileMaker Go Bug?




I am working with another developer on a big rollout for a primarily iPad based solution. We are using sliding panels as a major interface feature.  In the development process, we discovered a FileMaker Pro Bug.

The app is feature packed and has multiple sliding panels on each major interface page.  On some layouts, up to seven sliding panels are stacked on top of each other. While this results in a more complex development environment, the resulting user experience (UX) is impressive and has a reduced learning curve.


And it all works well on Mac’s and PC’s.


Using FileMaker Client on a Mac or a PC is not a problem.  When we programmatically activate a sliding panel, that panel assumes “Active Focus”, meaning the panels essentially drop behind the Active Focus panel despite their relative position in the stack.

For example, activating the 7th (lowest) panel in the stack using the “Go to Object” command essentially brings that sliding panel to the top of the stack.

Once on top, all functionality you would expect does work:  filed access, scrolling, popovers, button access, etc.  But...

Portal Scrolling does not work FileMaker Go


On FileMaker Go, however, there is a major problem.  Calling the 7th panel and giving it Active Focus on FileMaker Go works for all functions save one: scrolling a portal.  Watch this short video to see the bug in action:


[video width="1468" height="752" mp4="http://www.filemakerprogurus.com/wp-content/uploads/2018/03/FileMaker-Go-Bug.mp4"][/video]


Steps we have taken to try to squash the bug:




We reviewed all of the Window script steps:  Since the panels are placed on a Window, those commands were not effective.

We also tried various Navigation commands, and I suspect we could build a script to go to a record in a portal and force a scroll, but that is clunky and not intuitive to the user.

The only thing we have found that works is to hide the slider using “Hide Object When”.  The problem there is the logic it takes to properly hide up to 7 different sliders using conditional logic. It can be done, but only after all design considerations have been locked down.  Adding any new features sends us back to the logic maze with plenty of testing to ensure all works OK.


In the hope that there is a work around we have not yet discovered, I am posting this on various forums and with FileMaker, and also posting here on my blog.
Please leave a comment if you have an idea.  Your feedback is appreciated.


Friday, March 2, 2018

FileMaker and Shippo, and the 2–Minute Rule

Shipping Labels Using FileMaker and Shippo


Shippo Logo

Brandon Ray, of DB Services, posts a great how to do it article on integrating FileMaker with Shippo, an inexpensive online service that allows you to use just about any major shipping service.  Shippo provides an easy way to get shipping costs and allows you to print the label, too.  And all for a cost of only a nickel over the cost of shipping.

There is one small catch.


You'll probably have to double enter the customer's shipping information:  Once into your order system, and once into Shippo.  Errors creep in when double order entry is needed. But, no worries!

Ray's solution gives step by step instructions for connecting your FileMaker solution to Shippo....or you could just download the free FileMaker Example file at the link below and integrate that with your solution.

Source: FileMaker Shipping Labels with Shippo

 

The 2–Minute Rule


James Clear is back with research on how to stop procrastinating with what he calls the 2–Minute Rule.  It boils down to one simple observation:  Most things you put off are easily done, you just don't get around to doing them for some reason.  The 2-Minute Rule addresses that problem by defining an issue thus:  If it takes less than two minutes to do, then do it now.
The 2–Minute Rule works for big goals as well as small goals because of the inertia of life. Once you start doing something, it’s easier to continue doing it. I love the 2–Minute Rule because it embraces the idea that all sorts of good things happen once you get started.
  • Want to become a better writer? Just write one sentence (2–Minute Rule), and you’ll often find yourself writing for an hour.

  • Want to eat healthier? Just eat one piece of fruit (2–Minute Rule), and you’ll often find yourself inspired to make a healthy salad as well.

  • Want to make reading a habit? Just read the first page of a new book (2–Minute Rule), and before you know it, the first three chapters have flown by.


I tired this, and it's easy to apply.  You only have to invoke the 2-minute rule.

But I have bigger to-do's than 2 minutes!

When you have something that takes longer to do than 2 minutes, something you've been putting off, just give it two minutes.  That often leads to working longer on it and getting it done sooner.  Read up on the science backing this concept at the link below.

Source: How to Stop Procrastinating by Using the "2-Minute Rule"


Getting information off the Internet is like taking a drink from a fire hydrant.

Mitchell Kapor


 

Wednesday, February 28, 2018

FileMaker and Python Micro-Services

Note to readers:  As a followup to the FileMaker and Java Micro-Services post from last Friday, today's post from FMP Dude shows how to use Python and Flask to create micro-services.  This post also appeared  first on the FileMaker community website, and is reposted here with his permission.  So, if Java isn't for you, the same micro-services are available using Python.  Enjoy!


The Simplest Micro-Service!  (Python and Flask)


If you want to start using micro-services in FMP, consider Python and the super simple framework: Flask. If you're unsure what benefits micro-services give you, check out this list below:



Key benefits of micro-services include:
  • Uses industry standard protocols (HTTP verbs!).

  • Enables you to tap into powerful modern languages.

  • Easy to Learn.

  • No need to "re-invent the wheel" in a proprietary FMP-only CF to duplicate existing tested/free library routines.

  • Cross platform so the service can reside ... anywhere (Linux, Mac, Win). Local/WAN, Server, you name it.

  • Allows any application that can do a GET to use the service (Terminal, FMP, Firefox, Opera, Chrome, ....)

  • Is FREE. No expensive FMP-ONLY plug-in(s) needed. Install anywhere or everywhere. 1 user or 10,000 users...FREE.

  • NO FMP plug-in installation and configuration for every copy of FMP you might have.

  • NO restrictive plug-in license agreements.

  • Extremely powerful (get the full power of free third-party libraries often written in fast C language)

  • Puts you in charge of the service code. Not a third party.

  • Service Code Runs .... FAST!

  • Externalize loops to keep loops out of slow FMP scripts.

  • Service programming tools manage dependencies --- automatically!

  • Offers high abstraction. The caller of the micro-service doesn't need to know any details how the micro-service code works. Parameters can almost always. be passed simply letting the micro-service handle translations or other messy details.


(Note: Most modern programming languages, including Java snd Python, support micro-services.)

------------

Below is about the simplest micro-service you can write.

NOTE: this service example below isn't intended to be "production ready"-- as you'd certainly have much more error handling and other code. Instead, the example code below is just a "see how simple it is to get started and see all you can do..." kind of thing.

(You will need to have Python installed, of course and you will need to install Flask. Check out "pip" and other simple installers for python add-ons like Flask.)

Python micro-service starting point code below:

from flask import Flask, request


import hashlib

app = Flask(__name__)

@app.route('/')

def hello_world():

   return 'Hello World!'

if __name__ == '__main__':

  app.run()

If you save the code above into a file called, for example: "simple.py", and then run it from the command line, you have a Python (starting point) web service you can call from FMP!

Running this code gives you this output (you can change the port if you need to:

$ python3 simple.py

* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

(the service is up!)

Let's give this micro-service a workout:


From Terminal: $ curl localhost:5000

Output: >>> Hello World!

----

From POSTMAN:



 

From the IDE built-in REST Client:



The browser works fine, too.

 

From FileMaker:

 

INSERT FROM URL only needs one line since we're not sending data: "http://localhost:5000"

 



 

And, in the IDE where the service is currently running (can also start from command line and other options), we see our call to the web service from FMP:

 



--------

Let's add a method to do a hash.


 

Just create a simple method in your web service code and run it again:

 

@app.route('/HashMe', methods=['GET'])

def hashMe():

stringToHash = request.args.get("password")

m = hashlib.sha3_512()

m.update(str.encode(stringToHash))

m.update(b" Some Salt here for more security!")

return m.hexdigest()

----

Note: if we had also imported the pyperclip library, we could also, with one line of code, copy our hash to the clipboard:

pyperclip.copy(m.hexdigest())

----

From POSTMAN:

So, in just a few lines of code, we added a hash method we can call from any application that can do a GET!

Conclusion:


Using, in this case, Python, and the super simple framework Flask, in just a few lines of code you can have a working web micro-service.

My advice: Start easy. Start small. Build from there.





Education is not preparation for life; education is life itself.

John Dewey


Wednesday, February 21, 2018

2018 UX Design Trends

UX Design Trends and FileMaker


What's happening in the UX design world for 2018?  What can we learn from the latest trends and how (and should we) apply it to FileMaker database designs?

Let's take a quick look.

Shopify Predictions


Shopify's Oliver Lindberg delves deep into the subject, covering topics from variable fonts to ethical design to the death of the home page:
Last year was very much about web animations and microinteractions, conversational interfaces and chatbots, design sprints and bespoke illustrations. Even an approach that rejected mainstream web design trends became a trend itself: brutalism.

All of these trends are going to grow in 2018. In fact, Andy Budd, co-founder of pioneering UX consultancy Clearleft, thinks the subtle shift from UX design to digital service design is going to continue, and that we’re going to see much more interest in the field of service design from the digital sector this year.

Of particular interest to me is the Brutalism trend, which is basically turning away from the snazzier design trends:

 

[caption id="attachment_19622" align="aligncenter" width="443"]Brutalism Design Brutally simple.[/caption]

As you can see from its description, it is brutally simple.  And increasingly popular.   Something FileMaker developer's might want to emulate, mainly because a simple interface without a lot of pizzaz might be easier on the senses of someone pounding away at data entry and analysis. Be warned, however

Flat Design


Depending upon who you read, flat design is changing to adapt to 2018 trends by "adding nuance and depth to its prior ascetic identity", also known as adding more color, or is finally dying.  I am hoping for the latter:  I never liked it and the sooner it goes away, the better.  One thing younger readers will find as they get older is that the ability to easily discern contrast fades.  Flat design is low contrast and harder to read/view.

[caption id="attachment_19632" align="aligncenter" width="300"]Flat Design Flat design can by much harder to see for some.[/caption]

Fortunately, FileMaker moved away from it after a brief affair.

Inclusive Design


The shortcomings of flat design lead naturally to inclusive design, a movement deservedly gaining momentum:
These Inclusive Design Principles are about putting people first. It's about designing for the needs of people with permanent, temporary, situational, or changing disabilities — all of us really.

Inclusive design features the following principles:
  • Provide comparable experience
    • Provide alternatives like alt text, audio, etc.


  • Consider situation
    • Color contrast for outdoor users


  • Be consistent
    • Use consistent design patterns to build familiarity


  • Give Control
    • Allow zoom, for example


  • Offer choice
    • Consider providing different ways for people to complete tasks


  • Prioritize Content
    • Progressively reveal features and content when needed, not all at one time


  • Add Value
    • Using voice interfaces to control multimedia



There is much more to inclusive design than listed here, much of it applicable to FileMaker database development. I highly recommend a closer look.

There's much more


I've run out of time to cover all the trends and possibilities, but here is a partial list to consider in your design efforts
  • Artificial Intelligence

  • Video

  • Ethical Design

  • Voice User Interfaces

  • Scrolling effects

  • Typography

  • Mobile Animation

  • Storytelling

Sources:

10 no-nonsense web design trends for 2018 | Econsultancy

UX Brutalism

Inclusive Design Principles

Still more info:

Design Trends 2018: 28 leading designers, creative directors & illustrators tell us what’s inspiring them for the year ahead



Design is a funny word. Some people think design means how it looks. But of course, if you dig deeper, it's really how it works.

Steve Jobs

Friday, February 16, 2018

Using FileMaker and API's to Connect to the Web

FileMaker and API's


Chris Ippolite, of iSolutions fame, and FileMaker, joined forces to make this webinar back in November.  If you need to connect FileMaker to the web, this webinar shows several practical examples of how to do it:
  • Integrating with Slack

  • Integrating with Zillow

  • Integrating with Mail Chimp

  • Integrating with google Calendar

  • Integrating google Maps and street view

  • Using the FileMaker Data API as a data source for hundreds of thousands of users!


That last item connects FileMaker to Nodejs to a special caching service to scale up to enterprise level.  Did you know FileMaker could do that?

There's also a bonus:  a free FileMaker Example file: the Books database uses the FileMaker Go's barcode scanning and the google books API to retrieve the data from the books barcode.  You'll have to get your own google API Key to make it work, but that's a pretty straightforward process.

Don't Be Intimidated


Viewing the connection process that goes on behind the scenes is scary the first time you look at it...just remember that most of the work is done in one script step:  Insert from URL.  A lot of the rest processing the returned data into FileMaker by parsing JSON into FileMaker. Spend some time working through this script and you'll pick up a valuable developer skill.

See the Power


Kudos to Ippolite and FileMaker for powerfully showing how connecting FileMaker and API's dramatically increases usability for your clients.

 

[embed]https://www.youtube.com/watch?time_continue=35&v=utkfFYIdXyU[/embed]

If you want to learn more about using FileMaker and API's, click here to see all the posts I've made in the past on this subject.  Enjoy!


Something important for developers to remember:

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

Ted Nelson

Wednesday, February 14, 2018

You Are Paid to Solve Problems, Not Write Code

Solving Problems is Your Job


Most developers fall in love with writing code and making computers bend to their will....and of course solve problems.  But the reality is that most developers are paid to solve problems, which means much more that bringing coding skills to the table.

The successful programmer must learn much more than how to code to be successful:
  • The ability to communicate (very important!)

  • The ability to listen effectively

  • The ability to identify the problems

  • The ability to apply logic to solve a problem

  • And, finally, the ability to code efficiently in order to solve problems

You Can't Code in a Vacuüm


After applying all the skills you need to acquire, you still have to interact with others in a way that helps you succeed:
  • Working with your co-workers, client, and project manager

  • Keeping track of your time and effort

  • Commenting in your code to allow others to follow/improve/fix it

  • Learning the tools (and improving them) that allow you to interact effectively

  • Setting and meeting expectations with your client(s) and team

Keeping up with the Jones's


Don't forget that to do your job, you need to keep up to date with your skills:
  • Attend seminars to learn and to network

  • Read and apply new techniques

  • Study communication skills

  • Improve personal relationship skills

Improve your management skills


Most coders (sadly, say some) eventually move into management.  That's another whole set of skills that use many of the skills outlined above, so the transition will not be that difficult to master should you take that path.  What do you need to make that leap?
  • Study management techniques

  • Develop interpersonal skills

  • Learn how to become a mentor

  • Learn how to manage and support a team


As you can see, coding is just one important skill set of many if you want to be a successful programmer.  Just as you've learned to code, you need to now set new goals to be the best coder you be.

Good Luck!

Inspiration for this post came from Hacker Noon:  You Are Not Paid to Write Code – Hacker Noon


The best advice I ever got was that knowledge is power and to keep reading.

David Bailey