Zoho Creator Lookup field wrong data type

Zoho Creator Lookup field wrong data type

Hi 

I'm trying to get to grips with fetching records in creator and have created 2 forms:

Visitors (Name, Email)
Appointments (Date, Visitor, Email)

The Visitior field in Appointments is a lookup field related to the visitors form.
I've tried to define an action in script builder to take the name displayed from the lookup and fetch the email address of that visitor.
The problem is that the name field in Visitors is a single-line text field whereas the Visitor lookup field is being shown as numeric. So when I apply the criteria name == Visitors.visitor I get an error message to say that I am trying to perform a function of 2 different data types.

Is there a way to specify that the lookup field is a text field and not numeric.

I tried replacing the lookup field with a single line text field and entered the name manually and if fetched the email fine because both field types were text.