---
schema_version: "1"
id: 51e6faf6471d9e04586bb2567dc90500640e4db64f265a7612ac4d3124650fb5
title: Lens State Input
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/bi_dev_guide_rest/bi_requests_lens_state_input.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_rest.meta/bi_dev_guide_rest/bi_requests_lens_state_input.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: beadf1558a5b897ed725da03b888eb6222e005c63eaf0f5aeee7e157b64ec213
description: The state for an Analytics lens.
---
# Lens State Input

The state for an Analytics lens.

## Properties

| Property Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| options | [Lens​Visualization​Options​Input](#LensVisualizationOptionsInput) | The configuration options for different lens visualizations. | Optional | 36.0 |
| query | [Query​Input](#QueryInput) | The SAQL query to be used to create this lens. | If using any visualization type other than comparison table, you are required to specify this property. | 36.0 |

## Query​Input

| Property Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| aggregate​Filters | Object | The compact form aggregate filters for the query. | Optional | 48.0 |
| column​Groups | Object | The column groups for the query. | Optional | 56.0 |
| column​Totals | Object | The column totals for the query. | Optional | 56.0 |
| limit | Object | The query limit. | Optional | 48.0 |
| orders | Object | The query orders. | Optional | 48.0 |
| query | String | The SAQL query. | Optional for PATCH, required for POST | 36.0 |
| row​Totals | Object | The row totals for the query. | Optional | 56.0 |
| source​Filters | Map<String,[Compact​Form​Filter​Input](#CompactFormFilterInput)\> | The map of compact form source filters for the query. | Optional | 48.0 |
| sources | [Compact​Form​Source​Input](#CompactFormSourceInput)\[\] | The list of compact form sources for the query. | Optional | 48.0 |
| timezone | String | The timezone for the query request. | Optional | 43.0 |
| version | Double | Version to which this query language construct belongs. | Optional for PATCH, required for POST | 36.0 |

## Compact​Form​Filter​Input

| Property Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| boolean​Filter​Logic | String | The boolean filter logic. | Optional | 49.0 |
| filters | Object | The compact form filters. | Required | 48.0 |

## Compact​Form​Source​Input

H

<table class="featureTable sort_table" summary="">





            <thead class="thead sorted" align="left">
              <tr>
                <th class="featureTableHeader vertical-align-top " id="d46022e493">Property Name</th>

                <th class="featureTableHeader vertical-align-top " id="d46022e496">Type</th>

                <th class="featureTableHeader vertical-align-top " id="d46022e499">Description</th>

                <th class="featureTableHeader vertical-align-top " id="d46022e502">Required or Optional</th>

                <th class="featureTableHeader vertical-align-top " id="d46022e505">Available Version</th>

              </tr>

            </thead>

            <tbody class="tbody">
              <tr>
                <td class="entry" headers="d46022e493" data-title="Property Name"><samp class="codeph nolang">cogroup​Type</samp></td>

                <td class="entry" headers="d46022e496" data-title="Type">Connect​Wave​Compact​Form​Cogroup​Type​Enum</td>

                <td class="entry" headers="d46022e499" data-title="Description">The compact form source
                  cogroup type. Valid values are:<ul class="ul bulletList">
                    <li class="li">Anti</li>

                    <li class="li">Inner</li>

                    <li class="li">Left</li>

                    <li class="li">Outer</li>

                    <li class="li">Right</li>

                    <li class="li">Semi</li>

                  </ul>
                </td>

                <td class="entry" headers="d46022e502" data-title="Required or Optional">Required</td>

                <td class="entry" headers="d46022e505" data-title="Available Version">48.0</td>

              </tr>

              <tr>
                <td class="entry" headers="d46022e493" data-title="Property Name"><samp class="codeph nolang">columns</samp></td>

                <td class="entry" headers="d46022e496" data-title="Type">
                  <a class="xref" href="#CompactFormColumnInput">Compact​Form​Column​Input</a>[]
                </td>

                <td class="entry" headers="d46022e499" data-title="Description">The list of compact form source columns.</td>

                <td class="entry" headers="d46022e502" data-title="Required or Optional">Required</td>

                <td class="entry" headers="d46022e505" data-title="Available Version">48.0</td>

              </tr>

              <tr>
                <td class="entry" headers="d46022e493" data-title="Property Name"><samp class="codeph nolang">groups</samp></td>

                <td class="entry" headers="d46022e496" data-title="Type">Object</td>

                <td class="entry" headers="d46022e499" data-title="Description">The compact form source groups.</td>

                <td class="entry" headers="d46022e502" data-title="Required or Optional">Required</td>

                <td class="entry" headers="d46022e505" data-title="Available Version">48.0</td>

              </tr>

              <tr>
                <td class="entry" headers="d46022e493" data-title="Property Name"><samp class="codeph nolang">filters</samp></td>

                <td class="entry" headers="d46022e496" data-title="Type">Object</td>

                <td class="entry" headers="d46022e499" data-title="Description">The compact form source column filters.</td>

                <td class="entry" headers="d46022e502" data-title="Required or Optional">Required</td>

                <td class="entry" headers="d46022e505" data-title="Available Version">48.0</td>

              </tr>

              <tr>
                <td class="entry" headers="d46022e493" data-title="Property Name"><samp class="codeph nolang">name</samp></td>

                <td class="entry" headers="d46022e496" data-title="Type">String</td>

                <td class="entry" headers="d46022e499" data-title="Description">The compact form source name.</td>

                <td class="entry" headers="d46022e502" data-title="Required or Optional">Required</td>

                <td class="entry" headers="d46022e505" data-title="Available Version">52.0</td>

              </tr>

            </tbody>

          </table>

## Compact​Form​Column​Input

| Property Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| field | Object | The compact form column field | Required | 48.0 |
| formula | String | The formula for the compact form column. | Required | 48.0 |
| name | String | The name of the compact form column. | Required | 48.0 |

## Lens​Visualization​Options​Input

| Property Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| column​Totals | Boolean | Indicates whether to display column totals in the table (true) or not (false). | Optional | 55.0 |
| fit | Boolean | Indicates whether to scale the position and size of data shape so that it’s proportional to its percentage of its category (true) or not (false). | Optional | 36.0 |
| hide​Header​Column | Boolean | Indicates whether to display header column (true) or not (false). | Optional | 36.0 |
| legend | Boolean | Indicates whether to show legend (true) or not (false). | Optional | 36.0 |
| legend​Hide​Header | Boolean | Indicates whether to hide the legend (true) or not (false). | Optional | 36.0 |
| legend​Width | Integer | The width of the legend. | Optional | 36.0 |
| max​Column​Width | Integer | The maximum width of the header column. | Optional | 36.0 |
| min​Column​Width | Integer | The minimum width of the header column. | Optional | 36.0 |
| miniBars | Integer | The width of the miniBars, if present. | Optional | 36.0 |
| multi​Metrics | Boolean | Indicates whether multiple measures are projected on the same chart, side by side (true) , or if every measure is in its own chart (false). | Optional | 36.0 |
| normalize | Boolean | Indicates whether to scale the position and size of data shape so that it’s proportional to its percentage of its category (true) or not (false). | Optional | 36.0 |
| row​Totals | Boolean | Indicates whether to display row totals in the table (true) or not (false). | Optional | 55.0 |
| split​Axis | Boolean | Indicates whether each measure is projected on one axis or if all measures share an axis (true) or not (false). | Optional | 36.0 |
| sqrt | Boolean | Indicates whether the axis is sqrt scale (true) or not (false). | Optional | 36.0 |
| subtotals | Boolean | Indicates whether to display subtotals in the table (true) or not (false). | Optional | 48.0 |
| totals | Boolean | Indicates whether to display totals in the table (true) or not (false). | Optional | 36.0 |
| trellis | Boolean | Indicates whether the last group is treated as a trellis dimension (true) or not (false). Every distinct value of the dimension is a chart. | Optional | 36.0 |