---
title: Find Objects
slug: portal-sub/find-objects
docTags: 
createdAt: 2026-03-04T12:03:22.521Z
---

## Standard Queries Creation

The **Find Objects** feature allows you to create queries and search for information in the database.

The results of these queries can be used to analyse the organisation and its outputs. Imposing certain conditions ensures that only objects matching the conditions will be listed, and results limited to a specific number of items. For example, you can set up a query to report on all encounters that are owned by a Place of Service (POS) and have a status of **Unresolved**. The query design can be saved for repetitive use. The results of the query can be printed, stored, or exported to disk. Queries can also be imported and exported for backup purpose or to be shared.

Profile functionality is the same for primary care clinics and larger enterprise organisations. Depending on the needs, you may not always need to perform all steps described in this procedure for all queries.

### The Find Objects Window

The Find Objects window is where queries are set up. Open it by going to **Report/Find Objects** from the main menu. The Find Objects window will display in the **Query** tab where you design the query. The **Output** tab is where query results will be displayed.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/7d3PFHCp2XkkUq70Y75kP_pfafin2p0b2jbeokdkok8kd2ommkfqhwzq.png)

### Object Panel

The **Object** dropdown field allows you to select the main object you are querying, for example, **Encounters**. Once an object is selected, relevant fields and folders appear in this area. Please note that the same object MUST be used throughout the query.

### Select Panel

This is where you determine what should appear in your query results, organised in columns. You can also choose how to sort the information.

### Where Panel

This is where you set the conditions that need to be met for data to appear in the results. For example, you may want to report on encounters for a specific month only, and for a specific POS and/or Provider.

### Commonly Used Toolbar Icons

| Icon                                                                                                                                                                                                                                                                                                                                                                           | Description                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/jgHGR7teSXCa_jYByhMw2_vhgtbumzzcpsmun9hrznpt90kicrldpbw.png" size="10" isUploading="false" initialPath="assets/vhGtbUmZzCpsmun9HRZnp_T90kICRLDPbw.png" githubPath="en/Reporting and Analytics/Analytics/assets/vhGtbUmZzCpsmun9HRZnp_T90kICRLDPbw.png" position="flex-start" showCaption="false"}  | Creates a new query                                                                                  |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/h2rqaMwoHoYsDN_MDG-gk_ao3cjstnd9o2gzya8itxccgdsvj10ysecg.png" size="10" isUploading="false" initialPath="assets/aO3cJSTND9o2gzYA8itxCcgdSVj10Ysecg.png" githubPath="en/Reporting and Analytics/Analytics/assets/aO3cJSTND9o2gzYA8itxCcgdSVj10Ysecg.png" position="flex-start" showCaption="false"} | Opens a saved query in edit mode                                                                     |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/FGvXQgLsgooq24qKokP8q_g-muwgaba-utbzb7qmgu57two32i5nn25g.png" size="10" isUploading="false" initialPath="assets/g-MUWGAba-UtbZB7QMgU57TWO32i5nn25g.png" githubPath="en/Reporting and Analytics/Analytics/assets/g-MUWGAba-UtbZB7QMgU57TWO32i5nn25g.png" position="flex-start" showCaption="false"} | Saves the currently opened query                                                                     |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/TxJX3F2SQeEXa-91AifEf_1ti-ojkqjpgut5qx96low4i8fv75siygxg.png" size="10" isUploading="false" initialPath="assets/1TI-OjkQjPgUT5Qx96LOW4I8FV75SiyGxg.png" githubPath="en/Reporting and Analytics/Analytics/assets/1TI-OjkQjPgUT5Qx96LOW4I8FV75SiyGxg.png" position="flex-start" showCaption="false"} | Runs the query                                                                                       |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/rXpD_VBMjfQJ3r5T5Nvkf_ptqulnvdq9bldvdssdo0asw63gpcnyytfa.png" size="10" isUploading="false" initialPath="assets/PTqulnvDQ9bLdvdSSDo0AsW63GPCNyytFA.png" githubPath="en/Reporting and Analytics/Analytics/assets/PTqulnvDQ9bLdvdSSDo0AsW63GPCNyytFA.png" position="flex-start" showCaption="false"} | Displays SQL view when pressed before running the query                                              |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/kDp525p7-BKXHtj3si0br_wjmihbt1v0vb50q3a4anc0cg90hssghywq.png" size="10" isUploading="false" initialPath="assets/wjmiHBT1V0vB50q3a4aNc0cG90HssGHYwQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/wjmiHBT1V0vB50q3a4aNc0cG90HssGHYwQ.png" position="flex-start" showCaption="false"} | Exports/Imports the query                                                                            |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/iY-JB9MTlmkzaZdnSjyYK_3ivhvbvolhq1gyqyppkcilhkur8exfjt8q.png" size="10" isUploading="false" initialPath="assets/3IvhvBvOLHQ1gYqyPpkCiLhKur8exFJT8Q.png" githubPath="en/Reporting and Analytics/Analytics/assets/3IvhvBvOLHQ1gYqyPpkCiLhKur8exFJT8Q.png" position="flex-start" showCaption="false"} | Shows all available fields for selection when depressed. If not depressed, less fields are displayed |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/8gOFyZZ09hiYxWkG-n8XP_wmk0zeubxezub9kmtst8jjkyxsjkg3cgra.png" size="10" isUploading="false" initialPath="assets/WMk0ZeUbXezub9KMTST8JJKYxsjkG3cgrA.png" githubPath="en/Reporting and Analytics/Analytics/assets/WMk0ZeUbXezub9KMTST8JJKYxsjkG3cgrA.png" position="flex-start" showCaption="false"} | Allows registry of forms to run queries on them                                                      |
| ::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/GuuXlBWrWBOXlSi39lCNc_w-i-eun2iry9iex8mmg4evtpmsypvsnhla.png" size="20" isUploading="false" initialPath="assets/W-I-eUN2IRy9IEX8MmG4EVtpMsYPvsNHlA.png" githubPath="en/Reporting and Analytics/Analytics/assets/W-I-eUN2IRy9IEX8MmG4EVtpMsYPvsNHlA.png" position="flex-start" showCaption="false"} | Sets time after the query will time out                                                              |

### Query Design

A query design depends on the type of the data you would like to collect. For example, if you want to know how many patients/clients within specific age range and disease code were seen by a clinician, select **Patient** as the query object.

1. Go to **Report/Find Objects** on the main menu to display the Find Objects window
2. In the **Object** field, click the dropdown arrow to display objects available

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/iLTOGebaM4HTMXsWCuIqy_w4hxyhoyzjcev4uvpepghknwgzs1hep-ig.png" size="66" isUploading="false" initialPath="assets/w4hXYHoYZjcEV4UvpEpgHkNwGZS1heP-ig.png" githubPath="en/Reporting and Analytics/Analytics/assets/w4hXYHoYZjcEV4UvpEpgHkNwGZS1heP-ig.png" position="flex-start" showCaption="false" indent="2"}

3. Select an object that you want to collect data aboutAll the properties relating to that object will be displayed in alphabetic order as a list of sub-folders or items below.
4. Select the required property and add it to the **Select** panel by doing one of the following:

- double-click the property
- drag and drop the property to the **Select** panel
- right-click on the property and select **Add to Select** from the right-click menu
- click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/00-Nq2TsbDw4pkG5ws3le_acruupjnby70ogenup2ufulzoosnprh2w.png" size="10" isUploading="false" initialPath="assets/AcruUPJnby70_oGenUp2UfULzOOSnpRh2w.png" githubPath="en/Reporting and Analytics/Analytics/assets/AcruUPJnby70_oGenUp2UfULzOOSnpRh2w.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
in the **Select** panel toolbar
:::

:::hint{type="danger"}
**Note**

Properties can only be selected from one object according to context. You cannot mix properties from other objects as it will generate irrelevant data.
:::

5. Properties in the **Select** panel may be changed by using the buttons as follows:

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/pmUNVGCk1OTGWjPaWVQNu_xurz9ibabubwllr-rnuf-bfxiqihh0grdq.png" size="10" isUploading="false" initialPath="assets/xuRZ9ibabuBwlLr-rNUf-BfXiQIHh0GRDQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/xuRZ9ibabuBwlLr-rNUf-BfXiQIHh0GRDQ.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to delete selected property from list
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/gbpQ_fR6IIsYpRuTwB4Hr_6vuolldsbcwihmgtswqcqcb-joipqwm3a.png" size="10" isUploading="false" initialPath="assets/6VUOLlDsBC_WIhmgtSwqCqCb-joIpQwm3A.png" githubPath="en/Reporting and Analytics/Analytics/assets/6VUOLlDsBC_WIhmgtSwqCqCb-joIpQwm3A.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to move selected property up the list
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/TD-NKTrchmUr36pI-_1wS_spkrxvj4unrkim8grmvk9dvqqqtfnyjqqg.png" size="10" isUploading="false" initialPath="assets/SPKRXVj4UnRkim8grMVK9DVQqqTFnYJqQg.png" githubPath="en/Reporting and Analytics/Analytics/assets/SPKRXVj4UnRkim8grMVK9DVQqqTFnYJqQg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to move selected property down the list
:::

6. In the **Select** panel, click in the **Sort** column next to the property that you wish to sort the results by and select the required option from the dropdown field to specify in what order the results should be displayedFor example, if you select **Ascending** for the **Patient - DOB** property, the list of patients will be sorted form the oldest to youngest

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/YEQ3S_HjvaDOEr4larhZV_blfdnccieio8qj2edeghkdrtu4zbwlg.png" size="95" isUploading="false" initialPath="assets/bLFDnCcieIO8q_j2eDeGHKdr_tU4zbw_lg.png" githubPath="en/Reporting and Analytics/Analytics/assets/bLFDnCcieIO8q_j2eDeGHKdr_tU4zbw_lg.png" position="flex-start" showCaption="false" indent="2"}

7. Check the required grouping checkbox(es). For example, if you check the **Count** checkbox next to **Ethnicity** property, the results will be grouped by ethnicity and will show the total number for each ethnicity found, meeting the query criteria

:::hint{type="danger"}
**Note**

Greyed-out checkboxes indicate that they are not applicable for this property.
:::

8. In the **Object** panel, search for the required property that you want to use to define your search criteria and add it to the **Where** panel by doing one of the following:

- drag and drop the property to the **Where** panel
- click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/0962t7uTa-EaK0ppoonXm_qzuzrvjcvsvddujna-fw-rulafcl21mzrg.png" size="10" isUploading="false" initialPath="assets/QZuzrVJcvSVDdUJNA-fW-rUlaFCL21MZrg.png" githubPath="en/Reporting and Analytics/Analytics/assets/QZuzrVJcvSVDdUJNA-fW-rUlaFCL21MZrg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
in the **Where** panel toolbar
:::

- right-click on the property and select **Add to Where** from the right-click menu

9. Properties in the **Where** panel may be changed by using the buttons as follows:

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/qQHFDzJ8e7m5PFR9N4E4L_oqvrqhadnfvnkm4fgkgipxqnmwwrcl91bg.png" size="10" isUploading="false" initialPath="assets/oqvrqhADNFvnkm4fgkGipXqNmWWrcl91Bg.png" githubPath="en/Reporting and Analytics/Analytics/assets/oqvrqhADNFvnkm4fgkGipXqNmWWrcl91Bg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to delete selected property from list
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/XwrPF5nYvDsDCoYh-RALv_nsph2vpgg6d5azgubriyighrckzzkg3gsg.png" size="10" isUploading="false" initialPath="assets/NSPH2vpGG6d5AzGUBRiyIgHRCKZZKg3gSg.png" githubPath="en/Reporting and Analytics/Analytics/assets/NSPH2vpGG6d5AzGUBRiyIgHRCKZZKg3gSg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to move selected property up the list
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/D_4xWzO9dE_uBaev6Uv3U_sxowewrdh2wngyvijx-6g7nd1ctp903g1g.png" size="10" isUploading="false" initialPath="assets/sxoWEWRDh2wngyVijX-6G7nd1CtP903G1g.png" githubPath="en/Reporting and Analytics/Analytics/assets/sxoWEWRDh2wngyVijX-6G7nd1CtP903G1g.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to move selected property down the list
:::

10. For each property in the **Where** area, specify the required conditions:

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/WUaLHaffheirguZqr7myK_yhe6ghe-wlppj597ivmh5v1mxtr8leoq.png" size="100" isUploading="false" initialPath="assets/-yhE6gHe-_WLPpJ597ivmH5V1MxTR8LEOQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/-yhE6gHe-_WLPpJ597ivmH5V1MxTR8LEOQ.png" position="flex-start" showCaption="false" indent="2"}

- In the **Column** field, select the required option from the dropdown list
- In the **Value** field, if applicable, enter the required value directly in the field

:::hint{type="info"}
**Hot Tip**

For **Date** properties, you can either select the date(s) from the calendar by clicking in the **Value** field, or manually enter it. Also refer to the *Advanced Find Objects Techniques* section for more information
:::

11. Change the **Timeout** period if required. If the search is not complete after the timeout period, it will automatically stop
12. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/3wYvf2ED4XgWS-hJQALId_fzti2fvhurfstpo9rdbjd26xlcg6ugen6q.png" size="10" isUploading="false" initialPath="assets/fzTi2fVhurFStpo9rDbjD26xlCg6UgeN6Q.png" githubPath="en/Reporting and Analytics/Analytics/assets/fzTi2fVhurFStpo9rDbjD26xlCg6UgeN6Q.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
to execute the search to display the results in the **Output** tab
:::

:::hint{type="danger"}
**Note**

If you want to change the maximum number of results, go to the **Output** tab and enter the required amount in the **Limit to** field. Note that if the number of items found exceeds that specified in this field, a dialog will appear, prompting you to either limit the results to the set number, or keep searching.
:::

### Query Results

Sometimes, you may simply need to get some data from the find objects query, and may not need to save it, print it or do anything else with it. In most cases, however, you will probably need to print it. The procedure below describes how to format the query results to suit your needs and how to print it.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/O61_IUgSpSLBUTzaDHN8C_sr3l1uzuxfdrgpkgxg0mrcbne1ikt3fedq.png" size="52" isUploading="false" initialPath="assets/sr3l1uzuxfDRgPkgXg0mRcbNe1IKt3fEdQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/sr3l1uzuxfDRgPkgXg0mRcbNe1IKt3fEdQ.png" position="flex-start" showCaption="false"}

1. In the **Title** field of the **Output** tab, enter an appropriate title for the query.
2. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/A5Ks5ENerqbmjWKg27UrB_eoootu6rb873xaywdq0bqvaxcf1m5xyda.png" size="10" isUploading="false" initialPath="assets/eOOotu6RB873XaYWdQ0B_QvaXcf1M5XYdA.png" githubPath="en/Reporting and Analytics/Analytics/assets/eOOotu6RB873XaYWdQ0B_QvaXcf1M5XYdA.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to add and format a header to explain what the report shows.
:::

3. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/AxukikVUfwQXONnLSnMgB_oakp6kcawoaek7yzky73femyze0teviuwg.png" size="10" isUploading="false" initialPath="assets/oakP6kCaWoAEK7yZkY73femyZe0teVIuWg.png" githubPath="en/Reporting and Analytics/Analytics/assets/oakP6kCaWoAEK7yZkY73femyZe0teVIuWg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to change the columns properties.
:::

4. Change the column properties by selecting the column line and edit the properties described below

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/Ncy9HVRWnvvZzMiVHAf2J_jiyk6f9eflvfswlvy8ccomk7u95d87fzyq.png" size="88" isUploading="false" initialPath="assets/jIYk6f9efLvFSwlVy8ccOmk7u95d87fzYQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/jIYk6f9efLvFSwlVy8ccOmk7u95d87fzYQ.png" position="flex-start" showCaption="false" indent="2"}

- Column caption - Enter a new name for the column if required
- Column type - Select text, currency, quantity, date or use the default type by checking use default column type
- Justification - Select left, center, or right
- Width - Enter the required width, or check Auto Width
- Column calculations - Select count, sum, average, minimum, or maximum

5. Press **Update** when finished altering a column, to save the changes, before you select the next one.
6. Press **OK** when finished, to close the window.

The changes will apply to the way the information is displayed on the screen as well as on the printout.

:::hint{type="info"}
**Hot Tip**

If you check **Sum** for a column that already had **Count** checked in the query set up, then you will get a grand total at the bottom of the query results for that column.
:::

7. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/RkPCW1a5E7_MOZQTG-_vc_ukzopmzuqg5yxjyq6ciqspyxryazlnmvg.png" size="10" isUploading="false" initialPath="assets/u_KzoPMZUqg5yxjYQ6ciqSPyxryaZLNMVg.png" githubPath="en/Reporting and Analytics/Analytics/assets/u_KzoPMZUqg5yxjYQ6ciqSPyxryaZLNMVg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to re-run the query if you have made changes to the columns properties.The query results will show with the new column settings.
:::

8. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/lsHzugSovqRpKKtBVLIzd_wft9bzobsxghflnoeims158af3plc2gasw.png" size="10" isUploading="false" initialPath="assets/WFt9bZObsxGHfLNoEIMS158AF3pLc2gASw.png" githubPath="en/Reporting and Analytics/Analytics/assets/WFt9bZObsxGHfLNoEIMS158AF3pLc2gASw.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to export the query to Excel if you want to reformat it from there.
:::

- When prompted, save the query externally
- Open the saved file by double-clicking on its name

9. Click

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/c5z4ejWVjXrcPIXkhQJwx_6qyvvefj8wnqv8fkqeim24ugsdxbnvmqnw.png" size="10" isUploading="false" initialPath="assets/6qyVvEfj8wnQV8fKqEiM24UgSdXBnVmqNw.png" githubPath="en/Reporting and Analytics/Analytics/assets/6qyVvEfj8wnQV8fKqEiM24UgSdXBnVmqNw.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to print the query results.
:::

10. To save the query results as a text file:

- Ensure you are in the **Output** tab
- Go to **File/Save As** on the main menu to save it outside Profile
- Open the text file in a suitable program, e.g., Notepad, but not in Profile

This could be useful if you need to save the results as a ‘snapshot’ and come back to them at a later stage to analyse and compare them with other ones over time.

### Query Management

If you are likely to use the same or a similar query again in the future, you can save it so that it can be re-run at any time.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/kZDhMLII8GiSAg2h0SAOn_pzzkuepy-vtvqglrm6ekgku6ej6e7o2jkq.png" size="85" isUploading="false" initialPath="assets/PZzKuepy-vTvQglRM6EKgKu6ej6E7o2jKQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/PZzKuepy-vTvQglRM6EKgKu6ej6E7o2jKQ.png" position="flex-start" showCaption="false"}

1. Go to the **Query** tab and click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/NHv7yDceMq9gfkfb82mvU_y3uyrnpm-7mo6sad3armrfxprlr7oahng.png" size="10" isUploading="false" initialPath="assets/Y3uYRnPm-7mo6Sad3ArMRFxPR_lR7oaHNg.png" githubPath="en/Reporting and Analytics/Analytics/assets/Y3uYRnPm-7mo6Sad3ArMRFxPR_lR7oaHNg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
to display the **Save Query As** window appears.
:::

2. Select the folder that the query is to be part of, if applicable
3. In the **Name** field, enter the query name.
4. In the **Description** field, enter appropriate text.
5. If you wish this query to only be available to users that are members of a specific POS, select the required option from the dropdown list in the **POS** field.

Once a Find Objects query has been saved, it can be run by going to **Report/Stored Queries** on the main menu.

:::hint{type="info"}
**Hot Tip**

If the **FileNum** property is added to the **Select** panel of a query, then the resulting list can be used like a **Found List**: if you click an icon or select a menu option, it will be performed for the patient selected in the query results.Similarly, if the **Refnum** property is added for a case, when a line is selected in the results, it will set the case context. In other words, when clicking any icon on the toolbar, or performing menu actions, it will be for the selected case, if relevant, or for the selected case client.
:::

### Query Import or Export

You can import and export find objects queries. An example of when this could be useful is when you are perhaps setting up queries on a testing database, and you then want to use it in the production database.

### Query Export

1. Go to **Report/Stored Queries** on the main menu to display the **Stored Queries** window.
2. Select the query you wish to export.
3. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/9oA0DYbhmy-TCwQT91veI_vx-vy7tqn22wbgg3r1jxriocgwocm7q.png" size="10" isUploading="false" initialPath="assets/Vx-vY_7TqN22wbGG3R1_JxRIOCGwOCM7_Q.png" githubPath="en/Reporting and Analytics/Analytics/assets/Vx-vY_7TqN22wbGG3R1_JxRIOCGwOCM7_Q.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 in the toolbar to open the Export to file window.
:::

4. Select the appropriate folder or disk drive and enter a file name
5. Click **Save** to store the query.

### Query Import

1. Go to **Report/Stored Queries** on the main menu to display the **Stored Queries** window.
2. Click

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/awiFQTrIWSANBFhcq69nB_apw5hrydsu-14ootty7unnu4accxxwyjww.png" size="10" isUploading="false" initialPath="assets/apW5hRYDSU-14oOTtY7unnU4aCCxxwyjww.png" githubPath="en/Reporting and Analytics/Analytics/assets/apW5hRYDSU-14oOTtY7unnU4aCCxxwyjww.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
in the toolbar to open the **Import from file** window.
:::

3. Navigate to and select the file, then click **Open**.The **Save Query As** window appears.
4. Change the **Name** and **Description**, if required
5. Click **OK** to import the query.

### Registering Forms with Find Objects

Find Objects allows for compiling data entered in forms. First, the form has to be registered with Find Objects, then query can be setup.

1. Go to **Report/Find Objects** on the main menu to display the **Find Objects** window.
2. Click

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/TkfAsL9urOpwu3ExuwG99_fi80myy2rfwkgtdanfnacxyjupha09uqcq.png" size="10" isUploading="false" initialPath="assets/FI80MYY2rfwKgTDaNfnaCXyJUPhA09uqcQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/FI80MYY2rfwKgTDaNfnaCXyJUPhA09uqcQ.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
the **Maintain list of registered forms** icon in the toolbar to open the window.
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/83MmcXvDxESuGgzZxRXPx_zfjml1aauw5ofzecyoe22ktkw13fqqbfw.png" size="58" isUploading="false" initialPath="assets/ZFjml_1AAUw5OfzEcYoE22KTkw13FQqbfw.png" githubPath="en/Reporting and Analytics/Analytics/assets/ZFjml_1AAUw5OfzEcYoE22KTkw13FQqbfw.png" position="flex-start" showCaption="false" indent="2"}

3. Select the form you wish to register by using any of the following methods:

- Select it from the **Most Used Form Templates**, if available
- Type a key word in the **Look for** field, press **Find** then select the form from the search results list below
- press **Browse** and select it from the Exploring window (skip next step if using this method)

4. Press **Add** or drag and drop it into the **Forms registered with Find Objects** panel.
5. Press **Apply** and repeat steps 3 and 4 to register other forms.
6. Press **OK** when you have finished registering all the forms.

You can now create queries specific to the forms you have registered. An object called **Form (Registered)** is created with the registered form(s) appearing as a subfolder. The**Patient/Client** object also has a **Form (Registered)** subfolder, with the registered form(s) appearing under it.

:::hint{type="danger"}
**Note**

If you have saved a Find Objects query for a specific form as a stored query, you will be able to unregister the form and still run the stored query. To unregister a form, simply select it in the List of registered forms with Find Objects window and press **Remove**.
:::

### Group Queries Creation

Grouping queries enables the running of individual queries to be combined into a single process. This allows properties to be defined for some or all queries, as well as saving time in formatting reports.

1. Go to **Report/Stored Queries** on the main menu.
2. In the **Stored Queries** window either

- Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/veIndJ6Yb9Yb0h4N9iLWv_ybzhkvw7nizeewxtxyqt6bk7xcrcxnxffg.png" size="10" isUploading="false" initialPath="assets/YBzhKVw7nizeEwxtXYqT6bk7XcRCXNXffg.png" githubPath="en/Reporting and Analytics/Analytics/assets/YBzhKVw7nizeEwxtXYqT6bk7XcRCXNXffg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 on the toolbar, or
:::

- Right-click on a query and select **New Group Query** from the right-click menu

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/lGI_kaMSpWQRqOru6CCwt_umgannxmvvuj9va47klppribhhpzecsig.png" size="84" isUploading="false" initialPath="assets/_UmgANNxMVvUj9va47klpPRIbhhPzECsIg.png" githubPath="en/Reporting and Analytics/Analytics/assets/_UmgANNxMVvUj9va47klpPRIbhhPzECsIg.png" position="flex-start" showCaption="false" indent="2"}

3. In the **Group Query** window, click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/qAUCZIXo_Za0YKDva51pq_dx7l5j5utcnxfnicbfllwt4kje19okfzzg.png" size="10" isUploading="false" initialPath="assets/dx7L5J5uTCNXfnIcBFLlWt4Kje19okfZZg.png" githubPath="en/Reporting and Analytics/Analytics/assets/dx7L5J5uTCNXfnIcBFLlWt4Kje19okfZZg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 on the toolbar to add and format a header to explain what the report shows.
:::

4. Enter a title for the group query in the **Title** field.
5. Define which individual queries are to be part of the group, by double-clicking on them in the **Individual Queries** list.
6. Change the order of the queries if required, by selecting one and clicking 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/EbZyJYp4lgs26H5KYaGgE_pvduarmsokflmsxtojq7wcvjuohcarz-w.png" size="10" isUploading="false" initialPath="assets/p_vduarMsOkfLmSxTOjQ7WCvJuOhCarZ-w.png" githubPath="en/Reporting and Analytics/Analytics/assets/p_vduarMsOkfLmSxTOjQ7WCvJuOhCarZ-w.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
or
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/t5RoA8GqSWX46ysRj8PPE_icqdgjiyup0v2tqhme1vr6ckpa7mqapztq.png" size="10" isUploading="false" initialPath="assets/icQdGjiyup0v2tQHME1VR6CkPA7MqApZtQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/icQdGjiyup0v2tQHME1VR6CkPA7MqApZtQ.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
, as appropriate.
:::

7. For the selected query in the **Selected Queries** panel, check:

- **Title** - to include the individual query's title
- **Header** - to include the individual query's header
- **Page Break** - to insert a page break before the individual query

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/Z_Sui6er38YeusTQocOnk_39-luxprekzjmfd5re4y6-9wihwqlecca.png" size="59" isUploading="false" initialPath="assets/39-LUXpreKZjMfD5re_4y6-9wihwQLeCcA.png" githubPath="en/Reporting and Analytics/Analytics/assets/39-LUXpreKZjMfD5re_4y6-9wihwQLeCcA.png" position="flex-start" showCaption="false" indent="2"}

8. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/jJgjC07KPcQpOnNcAnTTJ_ddvabe1lnsyy0xjwtp6ojmgobujacsb9w.png" size="10" isUploading="false" initialPath="assets/ddVAbe1lNSYy0xJwTP6O_jmGOBUjaCsB9w.png" githubPath="en/Reporting and Analytics/Analytics/assets/ddVAbe1lNSYy0xJwTP6O_jmGOBUjaCsB9w.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to save the group query.
:::

9. Select the folder that the group query is to be part of, if applicable.
10. In the **Name** field, enter the query name.
11. In the **Description** field, enter appropriate text.
12. Press **OK**.

### Group Query Execution

1. Go to **Reports**/**Stored Queries** on the main menu.Group queries are preceded by the 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/EoPV3MUsiNchfCdrPp7xv_xkd-va4bn1yvmgatxxxbr6kypfxvedpfbq.png" size="10" isUploading="false" initialPath="assets/XkD-va4bn1YVMgatXXXbr6KyPfxvEdpfbQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/XkD-va4bn1YVMgatXXXbr6KyPfxvEdpfbQ.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 group query symbol.
:::

2. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/ZSC-fwJh9FaxZLZmQ8dDR_z9ibot1t9zgk34yusfcndowqs0axae65g.png" size="10" isUploading="false" initialPath="assets/Z9IbOT1T9ZgK34yuSFcndOWQS0AXaE65_g.png" githubPath="en/Reporting and Analytics/Analytics/assets/Z9IbOT1T9ZgK34yuSFcndOWQS0AXaE65_g.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
. A new **Group Query** window appears listing the individual queries
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/xt8okbdTkUcXDeGFOWb7W_g8fvocysyoisqauoptyxtxooe-zln3aoma.png" size="59" isUploading="false" initialPath="assets/G8FvOcysYoiSQaUoptYXtxoOE-zlN3aoMA.png" githubPath="en/Reporting and Analytics/Analytics/assets/G8FvOcysYoiSQaUoptYXtxoOE-zlN3aoMA.png" position="flex-start" showCaption="false" indent="2"}

3. Press **Run Queries**A check appears next to each query as it has been completed, along with the number of objects that have been found.
4. Select one of the following:

- Select an individual query in the list and click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/ruKuHOKej-bi05W9h31sy_0weiks-rozbn58fptvw9hyihstcoo9vw.png" size="10" isUploading="false" initialPath="assets/0WeiKS-rOzbn58fpt_VW9hYIhST_coO9vw.png" githubPath="en/Reporting and Analytics/Analytics/assets/0WeiKS-rOzbn58fpt_VW9hYIhST_coO9vw.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to view results for that query only. These can be printed or saved.
:::

- Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/OKbX8ZppWknmGGVfMmS5y_f9mflatkejey968pmye8fc57si4sp4qhbw.png" size="10" isUploading="false" initialPath="assets/f9MfLatKEJey968pmye8fC57Si4SP4qhBw.png" githubPath="en/Reporting and Analytics/Analytics/assets/f9MfLatKEJey968pmye8fC57Si4SP4qhBw.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to save the group query
:::

- Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/nQdZuyJGs1ouftXaeDd66_gnczhvjlvfyrrutydfcno75qyfsvsz6rza.png" size="10" isUploading="false" initialPath="assets/gNczhVjLVFYrrUtYdFCNO75QyFSvSz6rZA.png" githubPath="en/Reporting and Analytics/Analytics/assets/gNczhVjLVFYrrUtYdFCNO75QyFSvSz6rZA.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 to print the group query results
:::

5. Press **Close** and close the remaining windows

Like standard queries, once a group query is saved, it can be run by going to **Report/Stored Queries** on the main menu.

### Stored Queries

When queries are saved, they become stored queries, which can be run at any time.

### Stored Queries Structure

You can set up a structure for stored queries to group them into folders for convenience and/or associate them with a POS, so that only members of that POS will be able to run them.

This is particularly useful in large, multi-POS organisations, with a high number of queries, some of which only apply to a specific POS.

1. Go to **Report/Stored Queries** on the main menu to display the **Stored Queries** window.
2. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/1t9Ub2_PwY2LXws1IhimJ_u51i904zuc80p3c-75lx-0rwb3ed2ohg.png" size="10" isUploading="false" initialPath="assets/u_51I_904zUC80P3C-75lX-0RwB3ED2Ohg.png" githubPath="en/Reporting and Analytics/Analytics/assets/u_51I_904zUC80P3C-75lX-0RwB3ED2Ohg.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
to create the new folder.If you want to create a subfolder, select the main folder first.
:::

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/nCrcx9ozLgSmANNXlabQC_1srbe5t1casr7lay3pg5zynvtqspyudrdw.png" size="53" isUploading="false" initialPath="assets/1Srbe5T1caSr7LAY3pg5zYNVtQSpYudRDw.png" githubPath="en/Reporting and Analytics/Analytics/assets/1Srbe5T1caSr7LAY3pg5zYNVtQSpYudRDw.png" position="flex-start" showCaption="false" indent="2"}

3. In the **Enter name** field, enter a suitable name.
4. In the **POS** field, select the required POS from the dropdown list if you want this folder to be available only to users belonging to that POS.

### Stored Queries Execution

Standard and group queries that have been saved can be run at any time as stored queries, as described below. Stored queries results are valid at the time of running the query, as what was saved was the query, NOT its results.

1. Go to **Report/Stored Queries** on the main menu to display the **Stored Queries** window.
2. Select the query you want to run.You can open the query first, if required. This will allow you to view its set-up and also, if required, alter it.
3. Click 

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/5KKMp5njQp-NndJAJyXus_escjm1yv3y98-df7ph0iyrinbwqol6deow.png" size="10" isUploading="false" initialPath="assets/eSCJm1yv3y98-DF7Ph0IYriNBWQOL6DEOw.png" githubPath="en/Reporting and Analytics/Analytics/assets/eSCJm1yv3y98-DF7Ph0IYriNBWQOL6DEOw.png" position="flex-start" showCaption="false" indent="2"}

:::Paragraph{indent="1"}
 on the toolbar. The query results appear in a new window.
:::

:::hint{type="danger"}
**Note**

If a group query is being run, a Group Query window appears first. Press **Run Queries**.
:::

## Advanced Find Objects Query Techniques

### Query Order

The order that criteria are specified can significantly change the results of a query.The query where

Sex = F AND Age \< 50 ORUsual Doctor code = TU

will return patients who are female and under 50 as well as any patients with usual doctor TU regardless of sex or age.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/jQPvtniA5C_KT4Gw2gNpW_mtkpqmk9lbmzjfijlhtypn9fw5c88nwefg.png" size="79" isUploading="false" initialPath="assets/mtkpqmK9lbmZjFiJLhTYPN9fw5c88NwEFg.png" githubPath="en/Reporting and Analytics/Analytics/assets/mtkpqmK9lbmZjFiJLhTYPN9fw5c88NwEFg.png" position="flex-start" showCaption="false"}

The query where

Age \< 50 OR Usual Doctor code = TUAND Sex = F

will return a list of all female patients who are either younger than 50 or who’s usual doctor is TU.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/SZcrlnYkx-XXfBfw-Sip__mejjbumqxknt2ylycpn4v7bi70z2aldhkw.png" size="80" isUploading="false" initialPath="assets/MeJjBUmqXknT2yLycpN4V7bI70z2ALdhkw.png" githubPath="en/Reporting and Analytics/Analytics/assets/MeJjBUmqXknT2yLycpN4V7bI70z2ALdhkw.png" position="flex-start" showCaption="false"}

Adding another search function will change the query again.This query will return all female patients under 50 or who’s usual doctor is TU plus a patient named William regardless of sex, usual doctor, or age.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/R-j3bfYCfPqnU06w1AQfJ_z0b6zim5jcswtx22vh02-kpj-i4qheqw.png" size="80" isUploading="false" initialPath="assets/z0B6ZiM_5JCswtX22Vh02-Kpj-I4_qhEQw.png" githubPath="en/Reporting and Analytics/Analytics/assets/z0B6ZiM_5JCswtX22Vh02-Kpj-I4_qhEQw.png" position="flex-start" showCaption="false"}

:::hint{type="info"}
**Hot Tip**

‘Patient first name is equal to William’ will not return patients/clients who are registered with an initial such as ‘William B.’ or with dual names such ‘William John’. To match all instances use the **Starts with** option as a condition.
:::

### ALSO Operator

There might be a situation when you are attempting to search for more than one criteria match in the same object. The ALSO operator will create a secondary query within the statement.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/UezPtW_k4x2u0NBjjfIeM_dmurzsvzddwb17pb9rsulfn4cdixp4vna.png" size="80" isUploading="false" initialPath="assets/DmuRZSvZddwb17pB_9RSULFn4cdIxP4VnA.png" githubPath="en/Reporting and Analytics/Analytics/assets/DmuRZSvZddwb17pB_9RSULFn4cdIxP4VnA.png" position="flex-start" showCaption="false"}

In this example, patients might have a problem with description ‘asthma’ AND a second problem with description‘diabetes’.

Using AND operator in the above example would look for a match for both criteria specified in a single record. It will return a list of patients with problem description recorded as ‘diabetes and asthma’.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/aYC__LgcZ4SOHjvo6ChQS_or0ccykw1dbqoxeirrmb0btskg7ydhnu6a.png" size="80" isUploading="false" initialPath="assets/or0cCYKw1DbqOxeiRrMb0bTskG7ydHNU6A.png" githubPath="en/Reporting and Analytics/Analytics/assets/or0cCYKw1DbqOxeiRrMb0bTskG7ydHNU6A.png" position="flex-start" showCaption="false"}

Another query example will return patients that have an invoice billing for an injection and a second invoice billing for a visit in office.

ALSO NOT operator will search for all patients meeting the first criteria that do not meet the second criteria.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/8-FSbM882ny87kYjAFEBM_mffxk0gxol7cardwpekkxiq31ph1pk4wa.png" size="82" isUploading="false" initialPath="assets/mFFXk0G_XoL7cARDWpEKkXiq31pH1pk4wA.png" githubPath="en/Reporting and Analytics/Analytics/assets/mFFXk0G_XoL7cARDWpEKkXiq31pH1pk4wA.png" position="flex-start" showCaption="false"}

For example, you can run a query that lists patients who have diabetes but have NOT been diagnosed with asthma.

:::hint{type="info"}
**Hot Tip**

Using **contains** condition will list patients who have the word ‘diabetes’ used anywhere in the problem description field. Using **is equal to** would limit search to patients/clients where problem description is recorded exactly as ‘diabetes’.
:::

### IS IN Condition

IS IN condition allows you to specify multiple values as possible matches for a criteria in a single line.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/egWmWlu04iZHXTJyuB3sC_ulmxlbjcuiwnllxmbaj4lziiknmgfqq70a.png" size="80" isUploading="false" initialPath="assets/ulmxlBjcuiwNllxmbaj4LzIiKnmgFQq70A.png" githubPath="en/Reporting and Analytics/Analytics/assets/ulmxlBjcuiwNllxmbaj4LzIiKnmgFQq70A.png" position="flex-start" showCaption="false"}

For example, you can create a simple query to search for allpatients/clients with a label of either black, blue, or magenta.

IS NOT IN is the opposite; it will return any results that are not a match to any of the specified values.

### Unique Records

Adding the user-defined function DISTINCT will cause only unique records for the selected property to be returned. Use that function only on a column that is a unique identifier and make sure that it is the top column on the list.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/3EjZJEd1CxryhR9ecFXx0_tdqptfhxkz93hvhsb8sd7n4qj7coafa5ga.png" size="95" isUploading="false" initialPath="assets/TdqpTFhXKz93HVHSb8sD7n4qJ7COaFA5GA.png" githubPath="en/Reporting and Analytics/Analytics/assets/TdqpTFhXKz93HVHSb8sD7n4qJ7COaFA5GA.png" position="flex-start" showCaption="false"}

This query example will return a list of any patients who have an appointment booked with TU. Patients will only appear once on the list, however, they might be seen more than once by this doctor.

1. Select the line in the **Select** panel and click the tool

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/OQLKnon0FecZ6cQddlmuC_7stputmfi1kdqfamlj8okp1nipwnzkfpa.png" size="10" isUploading="false" initialPath="assets/7sTPUTMFI1kdQFaMLj8oKp1nIPWnZkFp_A.png" githubPath="en/Reporting and Analytics/Analytics/assets/7sTPUTMFI1kdQFaMLj8oKp1nIPWnZkFp_A.png" position="flex-start" showCaption="false" indent="2"}

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/rkDZQuN8WgN-h64Al4TMM_hsqwyptb66qnn5i6lcnalnj0s1piwfkja.png" size="54" isUploading="false" initialPath="assets/HsQWYptb66Q_nn5I6LCnALNJ0S1piWfkJA.png" githubPath="en/Reporting and Analytics/Analytics/assets/HsQWYptb66Q_nn5I6LCnALNJ0S1piWfkJA.png" position="flex-start" showCaption="false" indent="2"}

2. Type ‘distinct’ in front of (\&column).
3. Press **OK**.

### Relative Dates

Instead of a specific calendar date, you can enter a relative date that will be estimated each time the query is run.In the Find Objects’ window, select the line in **Where&#xA0;**&#x70;anel. In the following example, the query will return patients that have not been seen in last seven years.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/1vaznsFX-LixsD4gxnscx_pdkcitolbeqcvhwntqwrqnwipzswyljja.png)

Use one of the following options in the **Value** column:

- today inserts today’s date
- today-xd inserts today’s date minus x days, e.g., today-10d
- today-xw inserts today’s date minus x weeks, e.g., today-2w
- today-xm inserts today’s date minus x months, e.g., today-6m
- today-xy inserts today’s date minus x years, e.g., today-7y

### Dynamic Entry Values

You can enter a variety of dynamic entry values which resolve at run time by entering \:param (a colon and parameter) under the **Value** column. This will prompt for input of a value when the query is run.Entering only : will work, but assigning the parameter description will provide better guidance to the user as to what they should enter in the fields to be used as value.

In the example below, the query is setup to return a list of patients who have the specific usual provider.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/fiC9SDBAPxvYqLbYUFwxU_udzvvzrqxyubgloipcselzfsfdjr3aidog.png)

The user will be asked to provide the usual doctor’s code during run time.

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/8LG_9hv4LnBBfiMI_bujk_sakqgeaupbqqilqicsovwh48b1dtbolj-q.png" size="94" isUploading="false" initialPath="assets/SakqGEaUpBqQilQICSOvWH48b1DTbOlj-Q.png" githubPath="en/Reporting and Analytics/Analytics/assets/SakqGEaUpBqQilQICSOvWH48b1DTbOlj-Q.png" position="flex-start" showCaption="false"}

A code for any existing provider can be typed in the **Ask Value** field creating a query for this specific provider. In our example, ‘ws’ is typed for the provider’s code (**Preview** column will autopopulate):

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/OOvq33uvz2eusdhagPAev_gpzvfp1ugt7bi2lwjzwwsldkbnax5qxsw.png" size="93" isUploading="false" initialPath="assets/gPzvFp1Ugt7_bI2LWJZWwSLDkbnax5qxSw.png" githubPath="en/Reporting and Analytics/Analytics/assets/gPzvFp1Ugt7_bI2LWJZWwSLDkbnax5qxSw.png" position="flex-start" showCaption="false"}

### Ranges

You can also use specific range for your returned values. For example, you can find all patients with last names between A and C. Create a query with IS BETWEEN condition that will use two \:param entries:

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/taH1uICv1Q9uMF-WNEYwG_nr2a0a05yy72wuosm1h13lrq5dct4recog.png)

When you run this query, you need to fill in the information. In this example, it's the alphabet letters that create a range:

::Image[]{src="https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/TDiiYccc5KbdbFJRPzTZn_evnhrbtwxzrwxjbh1shpvg5piulpy7pztq.png" size="77" isUploading="false" initialPath="assets/EvNHrBTWXzRwxJbh1ShPvG5pIUlPY7PZtQ.png" githubPath="en/Reporting and Analytics/Analytics/assets/EvNHrBTWXzRwxJbh1ShPvG5pIUlPY7PZtQ.png" position="flex-start" showCaption="false"}

The process is similar for the situations where date ranges need to be used:

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/9mQs__DZfwlpA-SJ4U31E_uzrccjersqx11fcr7qmiy2rn85zrva1imw.png)

When running this entry, you will enter the start and the end date.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/DfpcefRfUXo_rxzKt-UkF_apf3i7imyo0sgkndnlewf6kbara5vx1lpw.png)

When using more than one criterion, as it is typical for a range, one element can be static and the other can be dynamic. For example, listing of billing that starts at the beginning of calendar year but the end date will be modified by the user each time this query is run can be set this way.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/Dcigqh0Ww-CozOdJvGrzr_b0aohpw7sqpusrkhxjk1j6iugfwzauqz1a.png)

When running this query, you need to enter only the end date which can be a specific date or simply today’s date as in the example below.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/D539Kzh5U3JsMUbBs72vZ_ztwmxcwhjcodmk-eddwwjaq8zsgizjuvq.png)

It is also possible to prompt the user for a specific portion of a search term when the rest of the term is static. Use the ?ask? statement as a dynamic part. For instance, create a FOQ where the user is allowed to specify only whether they want ‘Visit in Office’ or ‘Counseling in Office’ as a return for searching for service codes. The FOQ should be designed as follows:

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/TsrkbtyCIZQv184uc0Uib_mykavrecqcbvzc8rkdav1m2uicpbynej-g.png)

When running this query, user will be prompted to provide information in **Ask Value** column.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/7uEpKRY0VyhNilVlTexAI_0ruopudg7efzohecdry7o69n3x1tuqrpja.png)

***

## Attachments

::File{src="https://api.qa.archbee.co/api/presign/zICxj0dnLereb6UUrBA3-/OC5XEI5Vys1oRTXFm9uPY_6000237268-find-objects.pdf" label="Find Objects.pdf" initialPath="../../../attachments-export/6000237268-Find%20Objects.pdf" githubPath="attachments-export/6000237268-Find Objects.pdf"}
