Create a view from one result of another view and link to it I need to set up a contextual filter that will pass the information from a single row of a view into a new view that only shows that one row, using maybe a link that opens it into a new page or a PDF.


When a user clicks "Print" I would like the resulting page to just show the information from that one line...

Background

I have a view that lists a row of things in a table. It's data imported into MySQL that's not associated with a node. I need to build a view page certificate to use instead of Certificate.

The data is quiz scores and the fields are QID, Date, Course, Score and Print Certificate. The "Print Certificate" column is a Global: Math Expression field that basically compares the score (score) with the global passing score variable (pass_rate) and prints a link if the expression is not zero, otherwise the field is left blank. The expression I am using to accomplish this is: abs(([score]+1)-[pass_rate])+(([score]+1)-[pass_rate]).

Course is a custom content type that is connected to the quiz that was taken. The quiz also links to the course so that it comes up in this view and Quiz is using the Quiz module.

What I've Tried

I created another view as a page that is similar to the view that shows all the scores, except I limited it to one item, excluding all fields from showing and I arranged it as an unordered list instead of a table. Using Global Text field which is not excluded, add back all the other fields using replacement patterns in order to control how the data is rendered so that it reads more like a certificate about one specific quiz score or QID. What needs to be done in order that the information displayed on this view page is the same as the row that linked to it, or just one QID?

Notes

So why not just use certificate? Biggest issues are that there is no token for when the certificate was earned or when the quiz was passed. See my SE post. The other reason is because the quiz scores were imported as values from another site. See my other SE post on this.

Ideas
Can I use a contextual filter in the parent view with some php using the fetchfield() function such as something like:

db_query_range('SELECT 1 FROM {quiz_node_results} WHERE qid = :qid', 0, 1, array(':qid' =&gt; $[something]-&gt;qid))-&gt;fetchField();
With much help from an answer in this post I was able to solve my issue.
Here are the steps in case it is helpful to anyone else:


create a view (in my case, to show information from the quiz_node_results table, using quiz result ID or result_id) 
create a PDF view containing the same fields as in the first view; use the views PDF module
in the first view, add a Global PHP field (use the Views PHP module) and add some PHP to print a link to the data in the row of the table from the PDF view if the score is at least the score threshold (pass_rate) for getting a certificate:


&lt;?php
if ($row-&gt;score&gt;=$row-&gt;pass_rate) {
print l('Print','/data/'.$row-&gt;result_id);
}
?&gt;


in the PDF view, make sure the URL to the view is /data/% and add a contextual link; in my case, for the quiz result ID, set to show all if validation is provided and to show basic validation to show all if not provided