> ## 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.

# Special Members Equation Widget

> Guide to implementing the special members equation widget with specific syntax for member collections

The "members" equation widget is a special type of equation widget designed specifically for handling member collections with specific syntax in its "result".

## Example Code

```json theme={null}
{
  "type": "sheetTemplateWidgets",
  "attributes": {
    "type": "computed",
    "label": "Members Export",
    "export": true,
    "hidden": true,
    "equation": [
      {
        "condition": "@default",
        "result": "[
            { id: 'member',
            designation: '___',
            length: ____,
            lengthUnit: '___',
            nCom: ___,
            comments: '___'
            },
            {...}
            ]"
      }
    ],
    "referenceId": "members",
    "authorNotes": ""
  }
}
```

## Configuration Parameters

<ResponseField name="type" type="string" required>
  Set to "computed" to define the widget type
</ResponseField>

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

<ResponseField name="export" type="boolean" required>
  Always select true for members widgets
</ResponseField>

<ResponseField name="hidden" type="boolean" required>
  Whether or not the widget's value is displayed in any display level (including detailed). As this is an internal value only, this should be set to `true`.
</ResponseField>

<ResponseField name="equation" type="array" required>
  Array of dictionaries where each dictionary represents one member. See equation keys below.
</ResponseField>

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

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

## Equation Keys

<ResponseField name="id" type="string" required>
  refId of whatever widget is mentioned in `designation` - usually members but often varies. If this is a lookup with a selector key, it will be editable in the member schedule.
</ResponseField>

<ResponseField name="designation" type="string or print function" required>
  Will show in member column in schedule. This can be any string or equation you put into a equation widget, but must evaluate to a string.
</ResponseField>

<ResponseField name="length" type="string" required>
  refId of length widget for the member in designation
</ResponseField>

<ResponseField name="lengthUnit" type="string" required>
  Unit you want the length displayed as
</ResponseField>

<ResponseField name="nCom" type="string" required>
  refId of input for number of laminates typically for wood members. TBC if you can leave this out otherwise
</ResponseField>

<ResponseField name="comments" type="string" required>
  refId of comments widget - usually `comments`
</ResponseField>

## Important Note about `id` Key

<Warning>
  The members widget is also used to decide on the widget to use when editing inside the member inside the Member Schedule Page. Use the widget's referenceId inside the id key. Ensure the referencedId refers to a lookup with a "selector" (i.e. one that shows up the modal).
</Warning>
