Skip to content

Set a property

Sets one property value and saves every selected content item.

Warning

Preview the same property and selection with show property before running this command. A scoped selection can update many items.

Syntax

set property "<property-alias>" of content <selection> to "<new-value>"

Examples

Set one value:

UmbraScript
set property "latitude" of content at "/destinations/chicago/" to "41.8781"

Set the same value on direct children:

UmbraScript
set property "region" of content in "/destinations/" to "Midwest"

Behavior

The new value is supplied as a string. UmbraScript saves each item but does not publish it. The command does not select a culture or segment.

Result

The result contains summary, attempted, succeeded, failed, and a content array. Each item includes propertyExists, oldValue, newValue, success, and outcome.

If a content type does not contain the alias, that item is returned as a failure with propertyExists set to false.

Permissions

Requires access to the UmbraScript section and a signed-in backoffice user for each content save.

Common failures

  • The content reference cannot be resolved.
  • The property editor does not accept the supplied string format.
  • Umbraco rejects the save operation.

See also