> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/administrator-documentation/reports/creating-reports/creating-a-report-with-prompts.md).

# Creating a Report with Prompts

This lesson will show you how to create a report with prompts that you can use to search for particular instances. Before doing this, you should know how to create a basic report, which you can find [here](/administrator-documentation/reports/creating-reports/creating-a-basic-report.md), and how to create a report with conditions, which can be found [here](/administrator-documentation/reports/creating-reports/creating-a-report-with-conditions.md).

{% stepper %}
{% step %}

### Create a case using the entity you wish to search as a condition

<figure><img src="/files/eN9pr9OujqXl3ewyvu72" alt=""><figcaption></figcaption></figure>

To create a case that allows users to search as a specific condition, first create a case that uses the entity you want to search as a condition.

In this example, we are creating a report that allows a user to enter a username to see which cases that user has created. To do this, set "Case created by Name" as the sorting condition.
{% endstep %}

{% step %}

### Allow the user to enter their own prompt

<figure><img src="/files/Ni2bVhvPhn3O2Jk3RV6G" alt="" width="394"><figcaption></figcaption></figure>

By typing `("Enter Name")`, you will create a prompt in the report for the user to enter the name with which the records will be sorted. The text within the brackets and quotation marks can be anything you want, as it only serves as a title to the search page.

After this is done, save the report as normal.
{% endstep %}

{% step %}

### Enter your search criteria

<figure><img src="/files/2l66YbPlJL8YXWRdh3rJ" alt=""><figcaption></figcaption></figure>

When you run the report, you will now be met with your prompt and the opportunity to enter text. In this case, the prompt we created was "Enter Name", so when the name "John Smith" is entered, the report will search the system for all of the cases created by John Smith.

Once you have entered the name you wish to search, click "OK" to proceed and generate the report.
{% endstep %}

{% step %}

### Results

<figure><img src="/files/c4SytQqjNsTO76eaa3T6" alt=""><figcaption></figcaption></figure>

The report will now generate and list all of the cases created by John Smith.

You can search by any criteria on the system, making this kind of report very useful for picking out specific pieces of data. As this example shows, instead of having to create a new report to see which cases each user has opened, you can create a single report that allows the user to enter their own search term.
{% endstep %}
{% endstepper %}

### Date format prompts

If you want to give users a prompt to enter a date, it is possible to format the prompt as a calendar so that users can select a date instead of having to enter it manually.

<figure><img src="/files/psldGQRSlwlTZigGlhq4" alt=""><figcaption></figcaption></figure>

To do this, add a comma then "Date" after the closing quotation mark of the prompt but before the closing bracket. As you can see in the image, the prompt `("Enter Date")` becomes `("Enter Date",Date)` when this formatting option is inserted.

<figure><img src="/files/IeGeib1OJZ34qkdCgo5N" alt=""><figcaption></figcaption></figure>

When the date formatting option has been entered correctly, the user will be presented with a calendar to select a date from when they run the report.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/administrator-documentation/reports/creating-reports/creating-a-report-with-prompts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
