Self Service Validation script

SUGGESTED

I have a self service screen with existing validation scripts and want to add a validation script that makes sure that a new entry of the custom entity cannot be saved for the same visitor's company using the same date.  

I am trying to run an SQL query with the date and the companyid to see if there is an existing record and return an error using the 

The company field is not shown because the SSA field doesn't render properly and my validation script keeps returning "undefined" when I reference Values("cust_Companyid").

I want to keep the error feedback consistent with the existing errors by using a validation script. Is there a way to get the company id and pass it to the validation script.