Embedded Web Viewer

Many simple widgets can be deployed by creating an Embedded Web Viewer.

Clicking the "Embedded Web Viewer" does all the work for you in creating a web viewer with all the embedded code.

The button creates a web viewer object filled with the code needed for the widget.

This web viewer object has three distinct features:

  1. The object is named "web".
  2. The object contains all the code from WidgetStudio.
  3. Any data options are presented at the top in the variable declaration of the Let statement. This is where you'd update the values as necessary, and provide the File Name and Script Name for the fmp protocol.

Using the Embedded Web Viewer

The web viewer generated from this deployment method can be used anywhere in your custom app. It can be resized to fit a layout or the widget itself, and it can be placed on many layouts. Each one will be independent.

This widget will function fully and will, as the widget was set up, pass data back to FileMaker.

Remember these tips about working with the web viewer object:

  • The widget will reset every time the web viewer is exposed. Going to a layout with this object will reset it.
  • The web viewer object itself cannot be transparent. Instead the background will be white. In most cases, the author of the widget has provided the ability to change the background color, so you can use your layout's background color in the widget to give a transparent look.
  • The web viewer object cannot have objects on top of it.
  • On Windows, the web viewer object prevents a popover from rendering. If the popover is set to open on top of the web viewer, the popover will not render.

You can read more about working with the web viewer here.

Restrictions

This deployment method works when the widget is simple, but will not work for more complex or intricate widgets. This is because the calculation dialog has a character limit of 30,000. And, as is shown above, this method simply compiles the code into the web viewer's calculation dialog.

WidgetStudio makes it clear this method won't work for some widgets. The button is grayed out and you'll get a notification telling you this method doesn't work.