That seems to have gotten the query to work, but it appears that the value of bill_num is not being passed to the function. I am using an Alert and its giving a null value. I am reposting the corrected function code. The main prog was not changed.
Alert(.Bill_num) //”returns null value”
return “bol where bill_num is ” $ Display(.Bill_num) $ ” sort bill_num”
#(“Text”, “This is a test”))
title: “BOL Print”