ZWeb.Contacts.SearchLive (Portico/Z v0.1.0)

A search and duplicate check interface for Contacts.

Mostly it's a graphical wrapper around Z.Contacts.search/2.

Search on Mount

The following "pre-search" parameters are accepted on mount. If you pass these fields as URL parameters, a search will be attempted automatically when the liveview is mounted.

  • first_name
  • preferred_name
  • last_name
  • phone
  • email
  • street
  • city
  • zip
  • country

In addition, these "search filters" are accepted on mount:

  • limit (integer) - number of results to return
  • similarity (float between 0.0 and 1.0) - how "fuzzy" you want the results to be. 1.0 is an exact match, and 0.0 is basically useless :)

Portico Callback

If you wish, you can add a "select this contact" option for each returned contact, which will send the contact ID back to an arbitrary Portico module / script. If you wish to do this, you must add both of the following parameters:

  • fm_module - the name of the FileMaker file
  • fm_script - the name of the script to be called.

The link will send the portico_contact_id as the script parameter, in an href link called select this contact.

Link to this section Summary

Functions

Callback implementation for Phoenix.LiveView.render/1.

Link to this section Functions

Callback implementation for Phoenix.LiveView.render/1.