> ## Documentation Index
> Fetch the complete documentation index at: https://calcs.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lookup Widget

> Comprehensive guide to the versatile Lookup widget and its three main variants for different use cases

The Lookup widget is a versatile tool that can be configured for different purposes depending on your data organization needs.

## Lookup Widget Types

<CardGroup cols={3}>
  <Card title="Data Table" icon="table" href="/calcs_builder/widgets/lookup_data_table">
    Simple dropdown list options for calculations created directly in the builder
  </Card>

  <Card title="Shared Table" icon="file-excel" href="/calcs_builder/widgets/lookup_shared_table">
    Access data from uploaded Excel files with full table functionality
  </Card>

  <Card title="Toggle" icon="toggle-on" href="/calcs_builder/widgets/lookup_toggle">
    Logical true/false toggle with "Yes" or "No" options
  </Card>
</CardGroup>

## When to Use Each Type

### Data Table

Use a **Data Table** when you need:

* Simple dropdown list options for calculations
* Data that can be easily defined within the calculator builder
* Custom selection lists without external file dependencies

### Shared Table

Use a **Shared Table** when you need:

* Access to complex Excel data files
* Large datasets that are maintained externally
* Standardized tables shared across multiple templates
* Advanced filtering and data organization

### Toggle

Use a **Toggle** when you need:

* Binary choice options (Yes/No, True/False, On/Off)
* Simple boolean logic in calculations
* Clean, intuitive user interface for binary decisions

## Common Properties

All lookup widgets share these core properties:

<ResponseField name="type" type="string" required>
  Always set to "lookup" for all lookup widget variants
</ResponseField>

<ResponseField name="label" type="string" required>
  The name of widget, shows up as the section title
</ResponseField>

<ResponseField name="symbol" type="string" required>
  Symbol for the widget (supports KaTeX formatting)
</ResponseField>

<ResponseField name="defaultValue" type="string">
  Default index for the lookup. Must resolve to an integer, and may be a user formula.
</ResponseField>

<ResponseField name="visibleIf" type="string" default="true">
  An equation that must result in true/false and can hide the widget if certain conditions are met. Note that if visibleIf==false, then any other fields which try to reference this field will error.
</ResponseField>

<ResponseField name="export" type="boolean" default="false">
  Whether or not to export the value of the widget for use elsewhere in the platform, such as in load linking
</ResponseField>

<ResponseField name="hidden" type="boolean" default="false">
  Whether or not hide the widget entirely from users' view. Value can still be set in presets and read by other widgets.
</ResponseField>

<ResponseField name="referenceId" type="string" required>
  Unique reference ID of the widget
</ResponseField>

<ResponseField name="description" type="string">
  Description of section (not currently displayed, but will be)
</ResponseField>

<ResponseField name="references" type="string" required>
  Relevant code or standard reference for the section
</ResponseField>

<ResponseField name="authorNotes" type="string">
  Make notes relevant to internal development here; this will never be displayed publicly
</ResponseField>

<ResponseField name="referenceImage" type="string">
  Any image specifically relevant to the widget (image dataURI)
</ResponseField>

## Implementation Guidelines

1. **Choose the Right Type**: Select the appropriate lookup variant based on your data source and complexity requirements

2. **Data Organization**: Consider how your data will be maintained and updated when choosing between local data tables and shared Excel files

3. **User Experience**: Think about the user interface implications - toggles for binary choices, dropdowns for multiple options

4. **Performance**: Shared tables may have slightly longer load times but offer more functionality

## Next Steps

<CardGroup cols={3}>
  <Card title="Data Table Implementation" icon="table" href="/calcs_builder/widgets/lookup_data_table">
    Learn how to create and configure data table lookups
  </Card>

  <Card title="Shared Table Setup" icon="file-excel" href="/calcs_builder/widgets/lookup_shared_table">
    Understand Excel integration and shared table configuration
  </Card>

  <Card title="Toggle Configuration" icon="toggle-on" href="/calcs_builder/widgets/lookup_toggle">
    Implement binary choice toggles for your templates
  </Card>
</CardGroup>
