Skip to main content

_LookupBrowse

Last updated 19/12/2024

Overview

This documentation will demonstrate how to use Five's display type _LookupBrowse. _LookupBrowse enables you to browse through the records in the lookup list and view all the details for a record without leaving the current view. The records will stay in a read-only format, however, when the record is selected it will be populated in the field.




Let's take a look at an example. In the Soul Food application, we have a list of ingredient records. When you select a record, you have all the details about the ingredient.


Ingredient records
Figure 1 - Ingredient records

There is a Recipe form and ingredients can be added to the recipe. A category can be selected and then the Browse button can be used in the Ingredient field.


Browse button
Figure 2 - Browse button

When the Browse button is clicked, the full record for the first ingredient will be available. You can browse between the records by clicking the Next and Previous buttons.


Next and Previous buttons
Figure 3 - Next and Previous buttons

Once you have decided which record you want, the Save button can be clicked for the ingredient.


Save button
Figure 4 - Save button

The ingredient will then be populated in the Ingredient field on the Recipe Ingredients form.


Ingredient field
Figure 5 - Ingredient field

Back in Five, the RecipeIngredient table has foreign relationships with the Recipe, Category, and Ingredient tables and the Category table has a foreign relationship with the Ingredient form. The foreign relationship between the Ingredient and RecipeIngredient tables makes it possible that when on the Recipe Ingredients form, you can use _LookupBrowse and browse through the ingredient records.


Database model
Figure 6 - Database model

Form Setup

The Ingredients form has three fields.


Ingredients form fields
Figure 7 - Ingredients form fields

The Recipes form has two pages, the Recipe Ingredients page is a list page which references the Recipe Ingredients form. This is the form we need to edit to add the _LookupBrowse display type to the Ingredient field.


Recipes pages
Figure 8 - Recipes pages

Add a _LookupBrowse Display Type

1. Select the record in the list.

2. Click the Pages tab.


Pages tab
Figure 9 - Pages tab

3. Select the page record.


Page record
Figure 10 - Page record

4. Click the Fields tab.


Fields tab
Figure 11 - Fields tab

5. Select the field record.


Field record
Figure 12 - Field record

6. Either click the Edit button in the form app bar or click directly in the Display Type field.


Edit button
Figure 13 - Edit button

info
More than likely, as this is a foreign key on the form, you will already have it set as a lookup.

7. Click the lookup icon in the Display Type field and select _LookupBrowse.

tip
_LookupBrowse must reference a form where a foreign relationship has been established at the table-level!

8. If you did not have the field previously set as a lookup, you will need to click the lookup icon in the Referenced Form field and select the form to reference to get the values for the list.


Display Type field
Figure 14 - Display Type field

info
There is a dependent field being used here, as the Ingredient field depends on the CategoryKey field to know what to display in the Ingredient lookup. A dependent field is not required for a display type of _LookupBrowse.

9. Click the Save button in the form app bar.


Save button
Figure 15 - Save button

10. Click the Save button in the form app bar above the list.


Save button
Figure 16 - Save button

_LookupBrowse in the Form Wizard

If you know you want to use the display type _LookupBrowse on creation of your form while using the Form Wizard, select _LookupBrowse in the Display Type field.


Display Type field
Figure 17 - Display Type field