I have a document form where i display a tabular section of products on a table.
I noticed i can add a field of type image field. I set the datapath to a picture address and tried to load a picture from the disk but nothing is shown in both windows and android. The idea is to show small thumbnails of the product on the table.
The code below works perfectly when i have a single image field in a form and not in a table.
Code |
---|
for each row in Object.items Do Code = trimAll(row.itemCode.Code); PictureAddress = ""; picFile = new file(PicPath+code+".jpg"); if picFile.Exist() then picAddress = PicPath+code+".jpg"; PictureBinaryData = New BinaryData(picAddress); PictureAddress = PutToTempStorage(PictureBinaryData); else picFile = new file(PicPath+code+".png"); if picFile.Exist() then picAddress = PicPath+code+".png"; PictureBinaryData = New BinaryData(picAddress); PictureAddress = PutToTempStorage(PictureBinaryData); endif; endif; row.pictureAddress = PictureAddress; enddo; |
The variable PictureAddress in the row is of type string.
Is this even possible to be done? And if yes what am i doing wrong.