# Source Code Editor

It is possible to switch views in Studio from design view to code view. In code view, the code (xml) is presented instead of the graphical representation of it. Code view can help fixing corrupt files which cannot be rendered graphically, allow easy copy of file content and even allow for a quick search and replace.

{% hint style="warning" %}
Working in code editor should be done with care since an error in the code can cause an invalid xml and thus no longer making it possible to be presented graphically.
{% endhint %}

To enter Code view, open a workflow and then either right-click and select “View Code” or use the short key F7.

<div align="left"><img src="/files/-MO2HCZBT1o25I9MDmtx" alt="View Code"></div>

The view will now switch to code view and present the workflow as code instead of design view. To enable editing of code, click the edit button located in the top menu. (Note that workflow must be in edit mode as well for any changes to be possible.)

<div align="left"><img src="/files/-MO2HQWf0QDrOWY_q4Vn" alt=""></div>

When changes are made, click the “Apply Changes” in the top menu to save. To switch back to designer view, rick-click and select “View Designer” or use short key F7.

<div align="left"><img src="/files/-MO2H_QCPUkXFIk08f7m" alt=""></div>

#### Error prevention

The code view has some built in error handling to help showing and correcting errors. If an error is detected, a message regarding this will be presented and point to where the error occurs. This should help to quickly locate where and what the error is.

<div align="left"><img src="/files/-MO2HsRuKVgkwxBO8FuU" alt=""></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/development/flow-studio/applications/workflow/source-code-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
