Question: How to show in dynamic lists image from database from ValueStorage field (not by RowPictureDataPath way)? Use case: showing pictures of items catalog in ChoiceForm. For each Item used different picture, so there could be thousands of pictures in the list.
There are two ways to display a picture of an item:
1. Display a picture directly in the list.
This method is not recommended because it might significantly impact application performance (due to a lot of client-server requests).
2. Display a picture in a separate field.
Add a field of Picture type to your form. Link the field to a String attribute (for example, the attribute name is ItemPicture).
Add OnActivateRow handler to the dynamic list table. In this handler, use GetURL method to get the URL of the picture stored in your configuration and write it to ItemPicture attribute.
Then, every time you move the cursor through your dynamic list, the picture will change.
Thank you Yulia! But if use the first way - to display a picture directly in the list, how to do this in the managed application? ValueStorage type is not supported on client side forms, it seems like it is impossible to show the value in the list.
Rating:
1
Joined: Nov 10, 2015
Company: Clever Business Solutions
Make in Query DynamicList a column Type string (150)
Ex:<<--
Select ***, ***, CAST("NavLinkImg" AS String(150)) AS URLImg
-->
Column type on the form AS "Image field"
After on a Procedure OnGetDataAtServer Ins ert the Get URL code:
Ex:<<--
&AtServerNoContext Procedure ListOnGetDataAtServer(ItemName, Settings, Rows) For Each ItemRow In Rows Do ItemRow.Val ue.Data.URLImg = GetURL(ItemRow.Key, "FileStorage"); EndDo; EndProcedure