![](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
![](https://www.blogger.com/img/transparent.gif)
![](https://www.blogger.com/img/transparent.gif)
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>);
}