# New Form with more than one draft

The user access to a new form page and this form has more than one draft. Orbeon is going to ask the user if he wants to open a form from scratch or display all available drafts.\
[http://orbeonIP:port/orbeon/fr/{app}/{formName}/new](http://orbeonip/:port/orbeon/fr/%7Bapp%7D/%7BformName%7D/new)\
and the **second** to create a **new instance of the Form** (new link).\
\
**Service Type:** get\
**Servide Output:** application/xml\
**Service Path**: /crud/{app}/{form-name}/form/form.xhtml

![](/files/-LHZNJB0kIZIsaVRcMvy)

Orbeon request body of First Post:

```
<search>
    <drafts for-never-saved-document="true">only</drafts>
    <page-size>10</page-size>
    <page-number>1</page-number>
    <lang>en</lang>
</search>
```

Persistence Layer answer to first Post:

```
<documents page-size="10" search-total="2" total="2">
    <document created="2015-10-05T11:56:28.0700" draft="true" last-modified="2015-10-05T12:03:17.0700" name="2ddf095783da337a03c42a3522e9a25c618d5a22" operations="create read update delete ">
        <details/>
    </document>
    <document created="2015-10-05T12:33:26.0700" draft="true" last-modified="2015-10-05T12:33:26.0700" name="53625f2bccf4f2e399dddddd700e5456ea4c8129" operations="create read update delete ">
        <details/>
    </document>
</documents>
```

Orbeon request body of Second Post:

```
<search>
    <drafts for-never-saved-document="true">only</drafts>
    <query />
    <query name="nombre" path="section-1[1]/nombre[1]" type="xs:string" control="input" search-field="true" summary-field="true" match="substring" html-label="false" />
    <page-size>10</page-size>
    <page-number>1</page-number>
    <lang>en</lang>
</search>
```

Persistence Layer answer to second Post:

```
<documents page-size="10" search-total="2" total="2">
    <document created="2015-10-05T11:56:28.0700" draft="true" last-modified="2015-10-05T12:03:17.0700" name="2ddf095783da337a03c42a3522e9a25c618d5a22" operations="create read update delete ">
        <details>
            <detail>alberto</detail>
        </details>
    </document>
    <document created="2015-10-05T12:33:26.0700" draft="true" last-modified="2015-10-05T12:33:26.0700" name="53625f2bccf4f2e399dddddd700e5456ea4c8129" operations="create read update delete ">
        <details>
            <detail>pedro</detail>
        </details>
    </document>
</documents>
```


---

# 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://bpmflow.gitbook.io/project/orbeon-integration/orbeon-persistence-layer-for-gemstone-s/service-diagrams/untitled-8.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.
