> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: querySubmissionsByNamespace(options: QuerySubmissionsByNamespaceOptions) # Method package: wixFormsV2 # Method menu location: wixFormsV2 --> submissions --> querySubmissionsByNamespace # Method Link: https://dev.wix.com/docs/velo/apis/wix-forms-v2/submissions/query-submissions-by-namespace.md # Method Description: Creates a query to retrieve a list of submissions. The `querySubmissionsByNamespace()` method builds a query to retrieve a list of submissions from the specified namespace and returns a [`SubmissionsQueryBuilder`](#submissionsquerybuilder) object. >**Note:** You can only query submissions from a specified namespace. Use the query filter on the `namespace` field, otherwise you will receive an error. The returned object contains the query definition, which is typically used to run the query using the [`find()`](#submissionsquerybuilder/find) method. You can refine the query by chaining `SubmissionsQueryBuilder` methods onto the query. `SubmissionsQueryBuilder` methods enable you to sort, filter, and control the results that `querySubmissionsByNamespace()` returns. The following `SubmissionsQueryBuilder` methods are supported for `querySubmissionsByNamespace()`. For a full description of the Submissions object, see the object returned for the [`items`](#submissionsqueryresult/items) property in [`SubmissionsQueryResult`](#submissionsqueryresult). |PROPERTY |SUPPORTED FILTERS & SORTING |:---:|:---:| |`_id`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| |`formId`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| |`namespace`|[`eq()`](/submissions-query-builder/eq)| |`status`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| |`_createdDate`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| |`_updatedDate`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| |`seen`|[`ascending()`](/submissions-query-builder/ascending),[`descending()`](/submissions-query-builder/descending)| # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Query submissions by namespace (dashboard page code) ```javascript import { submissions } from 'wix-forms.v2'; export async function myQuerySubmissionsByNamespaceFunction() { try { const items = await submissions.querySubmissionsByNamespace() .eq('namespace', 'wix.form_app.form') .find() console.log('Success! Submissions:', items); return items } catch (error) { console.error(error) } } /* Promise resolves to: [ { "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03", "namespace": "wix.form_app.form", "status": "CONFIRMED", "submissions": { "last_name": "Doe", "first_name": "John" }, "revision": "3", "submitter": { "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a" }, "seen": false, "_id": "abb9b5c9-a881-467c-9c34-b9bea43ca5f0", "_createdDate": "2023-12-28T12:54:04.652Z", "_updatedDate": "2023-12-28T12:54:05.483Z" }, { "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03", "namespace": "wix.form_app.form", "status": "CONFIRMED", "submissions": { "last_name": "McBride", "first_name": "Patsy" }, "revision": "3", "submitter": { "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a" }, "seen": false, "_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d", "_createdDate": "2023-12-28T12:55:55.630Z", "_updatedDate": "2023-12-28T12:55:56.233Z" } ] */ ``` ## Query submissions by namespace (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { submissions } from 'wix-forms.v2'; import { elevate } from 'wix-auth'; export const myQuerySubmissionsByNamespaceFunction = webMethod(Permissions.Anyone, async () => { try { const elevatedQuerySubmissions = elevate(submissions.querySubmissionsByNamespace); const items = await elevatedQuerySubmissions() .eq('namespace', 'wix.form_app.form') .find(); console.log('Success! Submissions:', items); return items; } catch (error) { console.error(error); } }); /* Promise resolves to: [ { "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03", "namespace": "wix.form_app.form", "status": "CONFIRMED", "submissions": { "last_name": "Doe", "first_name": "John" }, "revision": "3", "submitter": { "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a" }, "seen": false, "_id": "abb9b5c9-a881-467c-9c34-b9bea43ca5f0", "_createdDate": "2023-12-28T12:54:04.652Z", "_updatedDate": "2023-12-28T12:54:05.483Z" }, { "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03", "namespace": "wix.form_app.form", "status": "CONFIRMED", "submissions": { "last_name": "McBride", "first_name": "Patsy" }, "revision": "3", "submitter": { "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a" }, "seen": false, "_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d", "_createdDate": "2023-12-28T12:55:55.630Z", "_updatedDate": "2023-12-28T12:55:56.233Z" } ] */ ``` ---