Help Centre › Functions & Formulas
This article describes the RPA Google Workspace connector function to set data validation rules on a range.
For a full list of available functions, please read GOOGLE WORKSPACE functions.
Description
The Set data validation function applies data validation rules to a range of cells. Rules can enforce drop-down lists, number ranges, date ranges, text patterns, and custom formulas.
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Google Workspace connector to use |
| Spreadsheet ID | Yes | Text | - | Google Sheets spreadsheet ID |
| Sheet ID | Yes | Text | - | Numeric sheet ID |
| Range | Yes | Text | - | A1 notation range for the validation |
| Rule | Yes | Text | - | JSON object describing the validation rule (type, values, strict) |
| Show dropdown | No | Boolean | true | Show a drop-down selector in the cell (for list rules) |
Errors
- Sheet not found – no sheet exists with the given ID
- Invalid rule – the validation rule JSON is malformed
Tips
- For a drop-down list, use rule: {"type":"ONE_OF_LIST","values":["Yes","No","Maybe"]}
- Set strict to false to show a warning instead of rejecting invalid input
Related functions
- Format cells – Apply cell formatting
- Protect range – Protect cells from editing