querySubmissionsByNamespace( )


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 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() 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 property in SubmissionsQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_idascending(),descending()
formIdascending(),descending()
namespaceeq()
statusascending(),descending()
_createdDateascending(),descending()
_updatedDateascending(),descending()
submitter.memberIdascending(),descending()
submitter.visitorIdascending(),descending()
submitter.applicationIdascending(),descending()
submitter.userIdascending(),descending()
seenascending(),descending()
Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user’s permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Submissions
Read Submissions
Manage Orders
Read Orders
Learn more about app permissions.
Method Declaration
Copy
function querySubmissionsByNamespace(
  options: QuerySubmissionsByNamespaceOptions,
): SubmissionsQueryBuilder;
Method Parameters
optionsQuerySubmissionsByNamespaceOptions

Query options.

Returns
JavaScript
import { submissions } from "@wix/forms"; 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" } ] */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?