Calculation with API

In my followup form I have a calculation field (“change_status”) wich change another field (“status”) from true to false or from false to true.

How can I make that calculation field, work with the API?

I have to make a query for the field “status” and then send another one to change it?

I imagine “status” is a case property, is that correct? You can query the case data API to get the current properties of a case.

There is an important distinction between a form definition and a form submission. A form definition contains calculations, question labels, and all sorts of things necessary for CommCare to display that form to a user and to fill it out. The result of that is a form submission, which has only the stored values. It doesn’t much matter how the values got there, whether by calculation or from user input.

If you view a form submission on CommCareHQ and click on “raw xml”, this is what the submission looks like. To submit via the API, you should follow the example of xml from a real submission. For instance, just copy whatever true or false looks like when submitted from CommCare.

Thank you for your answer. And yes “status” is a case property.