How to access lookup field values in fetch records
I have an application with a product form ICO.
To do a monthly inventory, I created a form Temp_Inv to allow users to enter inventory amounts, in On Load, I fetch records from ICO:
for each x in ICO
{
if (x.Inventory != "Labor")
{
insert into Temp_Inv
[
Added_User = zoho.loginuser
MD_Serial = x.MD_Serial
Inv_Date = eomonth(today,0).addDay(1)
Supplier = x.Supplier
Pack_1 = x.Pack_1
Pack_2 = x.Pack_2
Manufacturer_No = x.Manufacturer_No
RLQ = x.RLQ
Supplier_Product_No = x.Supplier_Product_No
Picklist = x.Picklist
Inventory = x.Inventory
DPI_Class = x.DPI_Class
DPI_Supp = x.DPI_Supp
]
}
}
This works fine EXCEPT Supplier is a lookup field and the form has values like 961809000002975135 for the supplier name. I tried to change the line to "Supplier = x.Supplier,ID" but after it was saved it went back to "Supplier = x.Supplier"
How can I access the supplier name?
Thanks
Alex Scott