Using "Fetch" In Script Builder

Using "Fetch" In Script Builder

Zoho wrote this script for me to Fetch information from one form and pull it into another form.

rec = Freight_Schedule[ID == input.Freight_Schedule];
Invoice_1=rec.Invoice_Number;
Invoice_2=rec.Invoice_2.toLong();

I tried to add to the script using the "Script Builder" and I came up with this script but it doesn't work.

rec = Freight_Schedule[Carrier = rec.Carrier];

I tried to changing it to

Carrier = rec.Carrier;

but it still doesn't work.

I'm using "Workflow" "Field Action" "On User Input"

Any thoughts?

Thanks in advance for any help.