Skip to main content

Saving and loading queries

Keep a library of common queries

After creating a query in the Data Explorer, you can save it for future use. Anyone in your Alloy customer project can then load your saved query to perform it again.

Save a query

To save the current query, select Menu (bottom-right) and choose Save query .

To overwrite an existing query, disable Save as new query, select Overwrite query and choose one from the list. Alternatively, enable Save as new query.

Enter a Name and then select Save to finish.

alt text

Load a query

To load a saved query at any time, select Menu (bottom-right) and choose Load query .

When you select a query from the list, it will be performed immediately and the results displayed within a new tab.

alt text

Load from code

To load an AQS query that's written in JSON code format:

  1. In the Data Explorer, select Add tab at the top, and choose any design/interface to continue.

  2. Select Menu (bottom-right) and choose AQS builder .

  3. In the AQS Builder, select Open JSON Editor . Paste your code into the editor and then select Done.

  4. Select Done again to return to the Data Explorer and see the results of your query.

You can then save your query using the method above.

alt text

AQS parameters

If you load a query that contains one or more AQS parameters, you'll be prompted to enter values for them before continuing.

alt text