Queries regarding need to close multiple pop up windows

Queries regarding need to close multiple pop up windows

In zoho creator we have delivery challan form and in report we have print button on click of this we want three copies need to generated so that we use open url function using popup window so that we able to achieve on getting three copies at a time but the real issue is that the navigation url provide to close the popup widow is not working can anyone suggest some best measure to rectify this issues.

Thanks in advance!

For your reference i enclosing the workflow below:
empty_list = {0,1,2};
// list_dc=Delivery_Challans[ID==];
for each index rec in empty_list
{
if(input.Challan_Number.contains("CWK") == true)
{
}
else if(input.Challan_Number.contains("CNK") == true)
{
}
else if(input.Challan_Number.contains("LP") == true)
{
// openUrl( "https://creatorapp.zoho.com/demo1senthuraa/delivery-challan/record-pdf/LPG/" + input.ID + "/#Script:page.parent.back","same window");
//zoho_appuri="/demo1senthuraa/delivery-challan/record-pdf/LPG/" + input.ID + "/";
//openUrl("#Script:page.open(https://creatorapp.zoho.com/demo1senthuraa/delivery-challan/record-pdf/LPG/" + input.ID + "/)", "same window");
//openUrl("#Script:dialog.closeAll","same window");
}
else if(input.Challan_Number.contains("FO") == true)
{
}
else if(input.Challan_Number.contains("LO") == true)
{
}
else
{
}
openUrl("#Script:page.Close ","popup window");
}