| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
- Return value
| Name| Type| Mandatory| Description|
| Type| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- |
| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
| defValue | string | Yes| Default value This parameter is user-defined. If it is not found in the database, the default value is returned.|
| defValue | string | Yes| Default value This parameter is user-defined. If it is not found in the database, the default value is returned.|
If the specified data item exists in the database, the **setValueSync** method updates the value of the data item. If the data item does not exist in the database, the **setValueSync** method inserts the data item into the database.
If the specified data item exists in the database, the **setValueSync** method updates the value of the data item. If the data item does not exist in the database, the **setValueSync** method inserts the data item into the database.
| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
| name | string | Yes| Name of the target data item. Data items can be classified as follows:<br><ul><li>Existing data items in the database, for example:<br></li><ul><li>Brightness: 'settings.screen.brightness'<br></li><li>Time format: 'settings.time.format'<br></li></ul><li>Custom data items</li></ul>|
| value | string | Yes| Value of the data item.|
- Return value
**Return value**
| Type| Description|
| -------- | -------- |
| boolean | Result indicating whether the value is set successfully. Returns **true** if the value is set successfully; returns **false** otherwise.|
- Example
| Type| Description|
```typescript
| -------- | -------- |
| boolean | Result indicating whether the value is set successfully. Returns **true** if the value is set successfully; returns **false** otherwise.|
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - This is a system API and cannot be called by third-party applications.
> - This is a system API and cannot be called by third-party applications.