Basic Lookup Field Update Function

Basic Lookup Field Update Function

Hi! 

So I have no idea what I'm doing in Deluge but I need to get a custom function to run On Create or Edit that sets the value of a Lookup Field based on the contents of another field. Seems simple enough, but I have looked through dozens of other similar questions and all of them seem more complicated than what I'm trying to do.

The lookup field in the Leads module to be updated is called "Brand" (api name is lead_brand), which is part of CustomModule5

The field in the Leads module that will determine the lookup value is "Company Source) (api name is Company_Source), which is a drop-down list. 

All I need it to do is associate the "Brand" lookup record with the Company Source of the same name.

My guess is that it would need to use the value of "Company Source" to look up the Brand record with the same name (api name is Name under CustomModule5). The Leads>Company Source and Brand>Name are exactly the same text, including spaces and capitalization.

I've seen mentions of using toLong to convert to a String but at that point I'm in over my head. Any help would be appreciated!

- Laura