PartProtection
✖
PartProtection
is an option for cloud expressions that controls which parts of their structure can be changed.
Details

- The setting for PartProtection specifies which parts of lists and associations in a cloud expression are protected from being modified in place.
- Possible settings include:
-
Automatic only individual elements can be changed All nothing in the expression can be changed None everything can be changed - When a change is attempted on a part of a cloud expression not allowed by the setting of PartProtection, a Failure object is returned.
- With the setting PartProtection->All, deleting the cloud expression using DeleteCloudExpression and resetting its value with Put are still allowed.
Examples
Basic Examples (2)Summary of the most common use cases
Create a CloudExpression storing a scoreboard:

https://wolfram.com/xid/0puw6ggfbu-fstjxc

Check that the PartProtection is set to Automatic:

https://wolfram.com/xid/0puw6ggfbu-v9g7c9

Increment the number of attempts of user "user2", which is an atomic subpart of the cloud expression:

https://wolfram.com/xid/0puw6ggfbu-0df3s8

https://wolfram.com/xid/0puw6ggfbu-80b07h

https://wolfram.com/xid/0puw6ggfbu-oo26r1

Attempt to modify the value of key "user1", whose value is an association:

https://wolfram.com/xid/0puw6ggfbu-dwj8j


https://wolfram.com/xid/0puw6ggfbu-b4oe2z


https://wolfram.com/xid/0puw6ggfbu-dain0v


https://wolfram.com/xid/0puw6ggfbu-f4a0ja

Create a new cloud expression with full part protection:

https://wolfram.com/xid/0puw6ggfbu-i6u0bo


https://wolfram.com/xid/0puw6ggfbu-89bsam

Set the part protection to None and try again:

https://wolfram.com/xid/0puw6ggfbu-by4bld

https://wolfram.com/xid/0puw6ggfbu-38tr44

https://wolfram.com/xid/0puw6ggfbu-854i8z

Wolfram Research (2016), PartProtection, Wolfram Language function, https://reference.wolfram.com/language/ref/PartProtection.html.
Text
Wolfram Research (2016), PartProtection, Wolfram Language function, https://reference.wolfram.com/language/ref/PartProtection.html.
Wolfram Research (2016), PartProtection, Wolfram Language function, https://reference.wolfram.com/language/ref/PartProtection.html.
CMS
Wolfram Language. 2016. "PartProtection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PartProtection.html.
Wolfram Language. 2016. "PartProtection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PartProtection.html.
APA
Wolfram Language. (2016). PartProtection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PartProtection.html
Wolfram Language. (2016). PartProtection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PartProtection.html
BibTeX
@misc{reference.wolfram_2025_partprotection, author="Wolfram Research", title="{PartProtection}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/PartProtection.html}", note=[Accessed: 08-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_partprotection, organization={Wolfram Research}, title={PartProtection}, year={2016}, url={https://reference.wolfram.com/language/ref/PartProtection.html}, note=[Accessed: 08-July-2025
]}