Menu
Feedback
Start here
Tutorials


Tutorials
Explore in-depth tutorials for operating your VTEX store.
Tutorials
Master Data
Master Data v1 applications
Creating custom queries in Master Data v1

A custom query in Master Data is a filter or combination of filters that can be saved and accessed directly in a form's record list.

Prerequisites

Before creating a query, follow the steps described in How to filter data in Master Data to set up a filter in the data entity and the form.

Saving a query

Follow the steps below to filter the form records and save a custom query.

  1. In the VTEX Admin, go to Store Settings > Storefront > Master Data.

  2. Make sure you are in the Applications tab.

  3. In the desired application, find the form you want to view and click the list icon .

    You will be redirected to the list of records for this form. On the side, you will see the configured filters.

  4. To filter, select the filter name and value, then click Filter.

    You can filter by multiple fields at once, and use multiple values for a single field. To remove a filter, click the X next to its value.

  5. Click the Save Query button.

  6. Add a name to the custom query.

  7. Click OK.

  8. Click OK again.

  9. Click the Applications tab.

  10. Click the Reload Applications button.

After following the instructions above, the query will appear as a display option in the form list.

{"base64":"  ","img":{"width":1092,"height":300,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":25414,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Master%20Data/Master%20Data%20v1%20applications/creating-custom-queries-in-master-data-v1_1.png"}}

You can also access the saved queries by clicking the Queries button in the form list:

{"base64":"  ","img":{"width":1368,"height":434,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":39861,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/Master%20Data/Master%20Data%20v1%20applications/creating-custom-queries-in-master-data-v1_2.png"}}

Configuring a default query

To set a form to always open the list with a custom query instead of displaying all the records, you can configure a default query. To do this, follow the steps below:

  1. In the VTEX Admin, go to Store Settings > Storefront > Master Data.
  2. Make sure you are in the Applications tab.
  3. In the application where you want to change the form, click the gear symbol .
  4. Click the edit icon on the form row where you want to add the default query.
  5. In the Default query option, select the custom query you want to display whenever you open the form's record list.
  6. Click Save.
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Creating relationships between Master Data v1 entities
« Previous
How to create an application in Master Data
Next »
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback