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

# Get Default Desired Columns From Restrictions2

> Calculate the default desired columns, i.

e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
NsApiSlow threshold: 5000 ms. 

                Archive Restriction strings are OData or SQL-ish.
                They are parsed and converted into ArchiveRestrictions.
            

            For example:
            <code>
                "name begins 'Super'"
                "category = 3"
                "category in (2,3,4)"
                "xstop set"
                "registered after '2014.3.4'"
                "registered dateBetween ('2014.11.29', '2014.12.25')"
            </code>
            Unary operators:
            <code>"updatedDate lastWeek", "assocId currentAssociate"</code><para /><h2>Brackets and or</h2>
AND and OR can be used to combine terms. AND has a higher priority than OR
<code>"business = 2  AND name contains 'super'"</code>
Brackets can be used for grouping.
<code>"(business = 2 or category = 3) and name contains 'super'"</code><para /><h2>Aggregation operators</h2>

                The column names can encode grouping and summarizing.
                You add functions and modifiers to the column name to trigger aggregation.
            

            Example: group last names together, and inject a header row for each group.
            <code>
                GroupBy(lastName):Header
            </code>
            Example: count instances of middle names, and hide the individual rows, 
            report just the totals for each group using a footer. Note how the modifiers stack.
            <code>
                Count(middleName):HideDetail:Footer
            </code>
            Example: the aggregator functions can nest, so you can say
            <code>
                GroupBy(DatePart(personUpdatedDate):YearMonth):Header
            </code><h2>Strings</h2>

                Use the begins or contains operators to do string searches.
                You can also use the normal = operator to do string exact match checks.
            


                Use backslash to escape single quotes in strings
                (note that backslash needs to be doubled because c# also uses backslash escapes):
            
<code>"department contains 'Bob\\'s'"</code><para />



## OpenAPI

````yaml /openapi/agent/openapi-v3-FindAgent.json post /api/v1/Agents/Find/GetDefaultDesiredColumnsFromRestrictions2
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - FindAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Find/GetDefaultDesiredColumnsFromRestrictions2:
    post:
      tags:
        - Find_Agent
      summary: Get Default Desired Columns From Restrictions2
      description: "Calculate the default desired columns, i.\n\ne., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.\r\nNsApiSlow threshold: 5000 ms. \r\n\r\n                Archive Restriction strings are OData or SQL-ish.\r\n                They are parsed and converted into ArchiveRestrictions.\r\n            \r\n\r\n            For example:\r\n            <code>\r\n                \"name begins 'Super'\"\r\n                \"category = 3\"\r\n                \"category in (2,3,4)\"\r\n                \"xstop set\"\r\n                \"registered after '2014.3.4'\"\r\n                \"registered dateBetween ('2014.11.29', '2014.12.25')\"\r\n            </code>\r\n            Unary operators:\r\n            <code>\"updatedDate lastWeek\", \"assocId currentAssociate\"</code><para /><h2>Brackets and or</h2>\r\nAND and OR can be used to combine terms. AND has a higher priority than OR\r\n<code>\"business = 2  AND name contains 'super'\"</code>\r\nBrackets can be used for grouping.\r\n<code>\"(business = 2 or category = 3) and name contains 'super'\"</code><para /><h2>Aggregation operators</h2>\r\n\r\n                The column names can encode grouping and summarizing.\r\n                You add functions and modifiers to the column name to trigger aggregation.\r\n            \r\n\r\n            Example: group last names together, and inject a header row for each group.\r\n            <code>\r\n                GroupBy(lastName):Header\r\n            </code>\r\n            Example: count instances of middle names, and hide the individual rows, \r\n            report just the totals for each group using a footer. Note how the modifiers stack.\r\n            <code>\r\n                Count(middleName):HideDetail:Footer\r\n            </code>\r\n            Example: the aggregator functions can nest, so you can say\r\n            <code>\r\n                GroupBy(DatePart(personUpdatedDate):YearMonth):Header\r\n            </code><h2>Strings</h2>\r\n\r\n                Use the begins or contains operators to do string searches.\r\n                You can also use the normal = operator to do string exact match checks.\r\n            \r\n\r\n\r\n                Use backslash to escape single quotes in strings\r\n                (note that backslash needs to be doubled because c# also uses backslash escapes):\r\n            \r\n<code>\"department contains 'Bob\\\\'s'\"</code><para />"
      operationId: v1FindAgent_GetDefaultDesiredColumnsFromRestrictions2
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request
        description: ProviderName, Restrictions
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
            text/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
            application/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
            text/xml:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
            application/json-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
            application/merge-patch+json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.FindCarriers.GetDefaultDesiredColumnsFromRestrictions2Request:
      description: >-
        GetDefaultDesiredColumnsFromRestrictions2: Calculate the default desired
        columns, i.e., the result columns for a given search. The search is
        defined by a provider name and a set of restrictions. This is the
        algorithm that is used by the Find service method.
      type: object
      properties:
        ProviderName:
          type: string
        Restrictions:
          type: string
    SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo:
      description: "This class carries information about the definition and properties of an archive display column. It is used by the archive\r\nMDO providers to construct column lists for the configuration dialogs, and by the archive control to know what type\r\n(and other properties) each column has. The class is serializable and used on both the application\r\nand Web server sides."
      type: object
      properties:
        DisplayName:
          description: The column name to show, can be a resource identifier string
          type: string
        DisplayTooltip:
          description: >-
            The column tooltip, used in the column list and in the column
            headings
          type: string
        DisplayType:
          description: "Type of column, so that the archive knows how to display it (actual display values are always strings, invariant-culture formatted).\r\nThis name can contain resource tags."
          type: string
        CanOrderBy:
          description: Can this column be used for sorting?
          type: boolean
        Name:
          description: "Unique identity of this column (in this particular context); the name to be used when requesting the column from a provider,\r\nsetting restrictions or order by criteria"
          type: string
        CanRestrictBy:
          description: Can this column be used as a restriction
          type: boolean
        RestrictionType:
          description: >-
            The data type of the restriction; use this to retrieve the legal
            operators for the restriction
          type: string
        RestrictionListName:
          description: >-
            If the restriction data type is 'list', this property contains the
            name of the SoList so that choices can be shown
          type: string
        IsVisible:
          description: Is this column visible to the user in configuration dialogs etc
          type: boolean
        ExtraInfo:
          description: >-
            Example: "navigator" -> Should this column be mapped to a
            hyperlinked navigator text type?
          type: string
        Width:
          description: "The width specification, if the column info has been extended with GUI-based information.\r\nIt is either \"n%\" or \"nc\", where n is an integer. Percent-formatted fields grow and shrink; number-of-characters\r\nformatted fields have constant width when the whole archive width changes."
          type: string
        IconHint:
          description: "Icon hint corresponding to the display name; this icon hint is used in the configuration dialog\r\nand other places where we 'talk about' the columns of the archive. The actual heading\r\nof the archive may also contain icons in lieu of textual names, the icon hint for that\r\nis specified in {SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo.HeadingIconHint} and is a different one."
          type: string
        HeadingIconHint:
          description: "Icon hint for the archive heading only. If this is a nonempty string, the archive header\r\nshould use this icon and ignore the {SuperOffice.CRM.ArchiveLists.ArchiveColumnInfo.DisplayName}. Otherwise, the DisplayName\r\nshould be used as the heading."
          type: string

````

## Related topics

- [SuperOffice.WebApi.Data.Find GetDefaultDesiredColumnsFromRestrictions2Request](/en/api/reference/webapi/SuperOffice.WebApi.Data.Find_GetDefaultDesiredColumnsFromRestrictions2Request.md)
- [NSFindAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSFindAgent.md)
- [SuperOffice.WebApi.Agents.IFindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IFindAgent.md)
- [SuperOffice.WebApi.Agents.FindAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.FindAgent.md)
- [Get Default Desired Columns](/en/api/reference/restful/agent/find_agent/get-default-desired-columns.md)
- [Get Default Order By From Desired Columns](/en/api/reference/restful/agent/find_agent/get-default-order-by-from-desired-columns.md)
