{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":37308,"path":"order-management/cpq-sets.md","title":"Sets","bundle":null,"doc_type":null,"release":"australia","body":"\n# Sets\n\nLearn how sets organize repeatable field groups, simplify complex configurations, and enable data aggregation across repeated elements in CPQ.\n\nA set is a reusable, repeatable collection of fields that lets administrators define multiple instances of similar configuration data—such as multiple products, components, or options—in a single blueprint.\n\nEach row in a set represents one instance of a repeated group of fields, and each field in that row behaves independently. sets streamline configuration design, reduce duplication, and support advanced use cases that require tabular or list-based inputs.\n\nAdministrators use sets to present configuration options in structured, table-like layouts that customers can easily edit in the end-user interface.\n\nSets are designed to:\n\n-   Simplify repeatable configurations. Instead of creating multiple fields and rules for each repetition, define once and reuse many times.\n-   Provide intuitive, tabular data entry. End users can add, remove, or edit multiple product instances in a structured grid.\n-   Support dynamic rules. Rules can reference values in the same row or aggregate data across all rows.\n-   Enable advanced reporting and summaries. Aggregates summarize field values across rows \\(for example, total quantity or total rack units\\).\n\n## How sets work\n\nA set groups several configuration fields together and repeats that group for each item in the list.\n\nEach set row is fully independent:\n\n-   Fields in the same row can affect other fields in that row.\n-   Fields in one row cannot directly affect fields in another row.\n-   Fields outside a set can influence fields inside it, but not vice versa.\n\nTo affect fields outside a set, use:\n\n-   Aggregates: Sum, count, average, maximum, or minimum values across all rows.\n-   Product rules: Define logic that sets external field values based on set data.\n\nA set can contain up to 2,000 rows.\n\n## Display options\n\nSets can appear in the UI in several formats, depending on user experience requirements:\n\n|Display type|Description|Example use case|\n|------------|-----------|----------------|\n|Table|Rows, columns, and cells with headers; ideal for detailed comparisons.|Configure multiple network devices.|\n|List|Each row shown as a card; can support single-select or multi-select.|Select delivery slots or service packages.|\n|Repeater|Displays one record at a time with navigation controls.|Edit configurations one-by-one in smaller layouts.|\n\nAdministrators control layout, alignment, and scrolling in the layout editor.\n\n## Field relationships\n\n|Relationship|Behavior|\n|------------|--------|\n|Inside → Inside|Fields in the same row can trigger each other through rules.|\n|Inside → Outside|Not allowed directly; use Aggregates or Product Rules.|\n|Outside → Inside|Allowed. Rules or field actions outside a set can change set field values.|\n\n## Key properties\n\nSets include several configuration categories that shape how users interact with the table or list:\n\n-   General settings: Orientation, maximum height, alignment, index labels.\n-   Display type: Choose between Table and List views.\n-   Inline settings: Show “Add Row” indicators, drop-down controls, or hover actions.\n-   Size settings: Manage how users increase or decrease set rows \\(numeric or slider field\\).\n-   Selection settings: Add single or multiple row selection with a Boolean selection field.\n-   Search settings: Allow users to search values in a set \\(for example, filter by available date\\).\n-   Message settings: Display validation messages or indicators in specific cells.\n\n## Managing set data\n\nSets support importing and exporting data in CSV format.\n\n-   Download set data: Exports only visible columns based on filters applied in the UI.\n-   Upload set data: Adds or updates rows in the set using a structured CSV file.\n    -   Rules run automatically on upload.\n    -   New rows are appended; matching rows are updated.\n    -   System-enforced limits apply \\(25 visible columns recommended\\).\n\nEnable uploads/downloads by adding JSON properties in the set’s raw value:\n\n```\n{\n  \"uploadDetails\": {\n    \"uploadButton\": { \"label\": \"Upload CSV\", \"visible\": true },\n    \"downloadButton\": { \"label\": \"Download CSV\", \"visible\": true }\n  }\n}\n\n```\n\n## Scripting with sets\n\nTo reference sets in rules or scripts, use the following syntax:\n\n|Use case|Example syntax|\n|--------|--------------|\n|Access the set|`set.<setVarName>`|\n|Access an aggregate field|`set.<setVarName>.<aggregateVarName>`|\n\nFor example:\n\n```\nif (set.networkDevices.totalRackUnits > 50) {\n   field.requiresAdditionalCooling = true;\n}\n\n```\n\n**Related topics**  \n\n\n[Configure sets](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/sets.md)\n\n"}}