Problems - Learning how to Fetch Data between Applications

Problems - Learning how to Fetch Data between Applications

I've searched the forums up and down, and have not been able to find any RECENT solutions for what I need to happen.  I bought into zoho creator because it is a database solution without having to need to know how to program and write code, however what seems like a fairly simple solution is requiring that I do just that.  Here is my situation:

I would like to fetch a record from a seperate application.    To keep it simple here is the example
Application1:
"Form1" includes fields: Name1, Type1
(Name1 is a single line text field, no duplicates)
(Type1 is a drop down field with 5 choices)

Application2:
"Form2" includes fields: Name2, Type2
(Name2 is a lookup field drop down that points to Name1 on "Form1" in Application1.)
(Type2 is a single line text field that I would like to automatically fill in once the Name2 lookup field is selected.)

The solution I followed (based on other forum posts) is:
In Application1 / Form1 / Workflow / Functions I entered in the following script:
  1. string externalapps.GetType(string name)
    {
        if (Form1[Name1 == input.name].count()  >  0)
        {
            return Form1[Name1 == input.name].Type1;
        }
        return "";
    }


Then, in Application2 / Workflow / Field Actions / Name2 - On User Input, I try to enter the following Script:
  1. input.Type2 = Application1.externalapps.GetType(input.Name2);
however when I save the script i get the error "mismatch data type for function 'GetType' at argument index 1 expected data type STRING found data type BIGINT"

I noticed when I tried to do everything through the Script Builder, that the Name2 under the Input Fields tab is categoriezed under "Numeric Fields" rather than text type fields.  I'm not sure if this is causing the problem or what.  I just am quite lost in figuring this out.  I know there have been some changes since the last post that I followed (https://help.zoho.com/portal/en/community/topic/how-to-fetch-records-from-a-separate-application) so anything you can do to help would be appreciated.