Opening View from list and passing record ID

Opening View from list and passing record ID

I am new to custom programming within ZoHo creator and am having difficuties in creating a function that will open a custom view with the lists record ID.
 
I have the custom view called Quote_Review_and_APQP_Tracking and here is the inital Free Flow Script
 
htmlpage Quote_Review_and_APQP_Tracking(potential_idstr)
displayname = "Quote Review and APQP Tracking"
pdf = true
content
<%{
    curPotential  =  Potential  [ID == input.potential_idstr.toLong()];%>




 
I have created a custom function called apqp.APQP_Window that is displayed on a list from another form.  The following is the contents of the function:
 
void apqp.APQP_Window(int Potential_ID)
{
    curPotential = input.Potential_ID;
    openUrl("#View:Quote_Review_and_APQP_Tracking", "Popup window", "height=100,width=100");
}




What I am not quite understading is how to pass the Potential.ID from the lists selected row and then open the Quote_Review_and_APQP_Tracking view.
 
Any assistance would be much appreciated.
 
Thanks