In this video, you will learn:
In this video, you will learn, what a custom prompt is. How to create a custom prompt using text mode and some examples that you can use in your reporting.
For those of you familiar with creating filters, using standard prompts in a report is relatively easy. You’ll be able to look at them and understand what to do. What qualifier to use and what value to enter to return the results you’re looking for.
However, for a new user, such as an executive who wants to look at the report but isn’t familiar with creating one or those who want ease of use, report prompts can be more of a hindrance than a help. You can help those users and make things easier long term by creating a custom prompt.
A custom prompt is a predefined prompt where you have hard coded the criteria. Simultaneously you create a simplified dropdown menu, with a list of filter options. For example, instead of creating the prompts each time, you want to narrow your report down to a team and timeframe and then running the report, you can simply select the pre-built option from the dropdown menu. Let’s take a look at where and how custom prompts are created.
Custom prompts are created in the same area as standard prompts but instead of choosing a field, click plus custom prompt. Now you’re able to name the custom prompt, add the filter options or the names that will appear in the prompt drop down menu and a place to hard code the filter requirements in order to return the desired results. The filter requirements in the condition field are written in text mode. All of the text mode must be on one line. Let’s look at two examples to create a custom prompt.
Let’s say you want to create a dropdown menu showing just the team names that you manage. This way, if you have a meeting with the creative marketing team in the next 10 minutes, you can easily filter your report to open requests for just that team. Once you click on the ad custom prompt, enter the field name. For this case, let’s put, “My Teams.” Next, start adding the options for the dropdown menu. In the first dropdown item label, field enter creative marketing. Once you place your cursor in the condition field, another row of boxes appears where you can enter another dropdown item label. Now you need to hard code the filter requirements next to each option in the condition field, using text mode. Here’s an easy way to get the text mode needed. Open another report to the filters tab.
Note, make sure the object type is the same. Create the filter in your custom prompt in the report using the standard builder. Once the filter is there, switch to text mode and copy the text that shows.
Go back to the condition field in the custom prompt and paste in the code.
Repeat the process with each option you have listed. Then click done, save your report.
Now you have your customized prompts.
What if you want to not only use the prompt to filter the report by team, but to the requests that are due this week? Follow the same steps you just did with a few modifications. In this example, you’re going to modify the condition for the creative marketing option.
Let’s go back to the other report where you created the filter and switch back to standard mode. You still have the filter for team name which you want to keep, but add the timeframe for this week.
Once again, you’ll switch to text mode to see the code added for the additional filter. Now remember, in the condition field for custom prompts, everything has to be on one line. So the question here is how do you get all of this code onto one line, so you can use it? The answer, ampersand. At the end of each line of code, add an ampersand without any spaces before or after it. You don’t need the ampersand after the list line. Once all the ampersands are in place, go to the second line and backspace, then go to the second line again and backspace. Repeat that step until all lines of code are in essence on the same line.
From here, copy the text, go back to the custom prompt option and paste.
In this case, since the previous dropdown item label is being modified, the label should be changed from creative marketing to something like, creative marketing requests due this week. Once the conditions have been hard coded and added, click done and save the report to show the updated custom prompts.
Custom prompts are a great way to make your reports not only visually cleaner, but easier for your users to quickly access the information they’re looking for. -
Your custom prompts should look similar to this and have the following text mode:
Once you save the custom prompt, the prompt drop-down menu should look like this:
The text mode in your custom prompt should look like this:
And the drop-down label for active prompts should be updated to reflect the change in the code like this: