Lookup field returning ID not String on page. Please Help!

Lookup field returning ID not String on page. Please Help!

hey all

So I have a page that displays selected product information triggered via a custom function on a report.

It shows the name of the product, price and image

I'm also trying to show the company name of the product, but only get the ID number not the string value.

On the "Add_Product" form, the company name is selected via a Lookup Field that gets its results from the "Add_Company" form

I've made the code in bold that is returning the ID number.

Anyone know what code to add and where to make it show the company name for the product selected.


Thanks, here is my code:


  1. htmlpage ProductSample(empid)
  2. <%{%>    <style>
  3.   .whole_container{
  4.   width:50%;
  5.   float:left;
  6.   text-align: center;
  7.   }

  8. .after-box {
  9.   clear: left;
  10. }
  11.     </style>
  12.  
  13.   <h2 align="center">Mood Board</h2><%prodLst = input.empid.toList();
  14.     for each prod in Add_Product  [ID in prodLst]
  15.     {%>        <div class="whole_container"><%=prod.Product_Name%>    <br> <%=prod.Company_Name%>   <br>£<%=prod.Price%><br>W <%=prod.Width%> - H <%=prod.Height%> - D <%=prod.Depth%><br><%for each rec in prod.Product_Images
  16.         {
  17.             if (rec.Product_Image.contains("/sharedBy"))
  18.             {
  19.                 x = rec.Product_Image.getSuffix("/image/");
  20.                 y = x.getPrefix("\" border");
  21.                 a = "https://creatorexport.zoho.eu/zoho_z/product-catalog/All_Products/" + prod.ID + "/Product_Images.Product_Image/image-download/" + y;%>                <img src = <%=a%> border = "0"></img>            <%}
  22.             else
  23.             {%><%=rec.Product_Image%>            <%}
  24.         }%>        <br><br> <br><br> </div>    <%}
  25. }%>