Fteching Data from Lookup Field in Another Form
I have the following Forms:
Form Name: Components
Field: Comp_Description
Field: Comp_Category (this is a LookUp field linked to another form named Category)
Form Name: Category
Field: Cat_Category
Form Name: Pricing
Within this form I am fetching data from the Components form using the following script:
if(Components[ID == input.Pricing_Part_Number].count() > 0)
{
x = Components[ID == input.Pricing_Part_Number];
input.Pricing_Description = x.Comp_Description;
input.Pricing_Category = x.Comp_Category;
}
When I run the application it fetches the Description correctly but displays Category in numerals instead of text. I know this is because it is fetching data from a lookup field referencing another form. My question is what is the correct script to fetch the actual data from the lookup field. Please reply specifically with my script corrected as I have seen some answers but cannot correctly adapt it to my data.