Saturday 1 July 2017

Using Drilldown URL Links in PSQuery

This nifty trick basically allows you to create hyperlinks on a PSQuery result.

Very useful for those drilldown reports where you click a link and it brings you further down the rabbit hole to more detailed information.

In this case, we will create 2 queries and try to link them using Drilldown URL.

Here I am creating 2 new queries.



Now, I will add edit prompts on our 2nd query aka "The Receiving Query".

Save that and go back to our 1st query aka "The Sending Query".

I will add a new expression, just a string that will serve as the link.

Add a new expression but this time, set it as a Drilling URL.
Ignore the Expression Text, that will be populated automatically.

Click "Query URL" link.
Enter the Query Name of "The Receiving Query" and choose a Format.
Hit the Prompt Keys button and it will load the criteria from "The Receiving Query". Now we need to map these fields to the correct Key Values from "The Sending Query".

Next part is the magic.

When you hit Map Columns button, it lets you choose which columns in "The Sending Query" will get converted to a hyperlink to "The Receiving Query".

For this example, I set to EXPR5_5 (our dummy field). I added in BUSINESS_UNIT and PROJECT_ID for fun.

Here's the result. It may not be very visible but Unit, Project, and the last columns are hyperlinks.

Clicking any of those 3 values will load "The Receiving Query" already filtered with the value from "The Sending Query".

Neat.

1 comment:

  1. I'm impressed, I must say. Very rarely do I come across a blog thats both informative and entertaining, and let me tell you, you ve hit the nail on the head. Your blog is important.. shop online for a energy drink

    ReplyDelete