Skip to main content

_LookupQuery

Last updated 19/06/2023

Introduction

This documentation will demonstrate how to use Five's _LookupQuery display type.

The _LookupQuery display type enables you to attach a query to a field. The results of this query can be used as the lookup value in the field. In its minimal form a _LookupQuery display type must have:



  • A primary key field to have uniqueness
  • A value field to display in the lookup

Metadata can be provided in a lookup query to return results that can be used in conjunction with a function.

Before you begin this documentation, please refer to the Introduction to Five's Lookups chapter so you have an understanding of the database design to demonstrate the display type _LookupQuery. All the tables used to demonstrate Five's lookups are documented in the Introduction to Five's Lookups chapter so you can build them if you wish and use them to learn about our lookup display types. This documentation is designed for you to build and add data to get a thorough understanding.



How to Use the _LookupQuery Display Type

Before you use the _lookupQuery display type, you must add your query in Five first. The _LookupQuery display type requires you to make the selection of _LookupQuery in the Display Type field. When you select _LookupQuery a new field will become available called Lookup Query. This will require you to select the query from the lookup.

Add the Forms

The forms created below will be used to demonstrate how a _LookupQuery display type works.