Fetching Data from lookupfield

Fetching Data from lookupfield

Hello

I want to fetch the data from a form, one field of the data is a lookup field and I am unable to fetch the information

Can someone please help me with it

x = SMAT_Audit_Schedule[ID == input.SMAT_EMAT_Audit_Schedule_no];
//input. refers to fields in current form
input.Site_Area1 = x.Site_Area;


Please note that Site_Area1 and Site_Area are look up fields.

Thank you

Amanda