Adobe Campaign | Update schema in java script
![](https://binarycipher.dev/wp-content/uploads/2022/01/image.png)
![](https://binarycipher.dev/wp-content/uploads/2022/01/image.png)
Problem: How to update a schema attribute in the javascript activity of the Adobe campaign Solution: //Update the sample schema to set the myattr to “test” function updateSample(test){ xtk.session.Write(<sample _operation=”update” myAttr={test} _key=”@id” id={primaryKeyID} xtkschema=”nms:sample”></sample>); }