Using BLOB column

When BLOB column is used, stored data is always sent to the client. Is it possible to avoid this situation and wait until user’s decision to download it?

  1. Define the column with blob data as ExcludeFromAllFields=True in order not to send the column unless it is explicitly defined on data structure level
  2. In the data structure which serves data for screen containing BLOB column add explicitly the BLOB field, and define it with IsWriteOnly=True so that the column is not sent, but is just for writing (uploading)
  3. Open screen section containing blob column and click on blob control widget controlling your BLOB column. In property grid of the blob control fill-in the property BlobLookup with a lookup that returns as a ValueDisplayMember the BLOB column and value is get by the primary key of an entity in which your BLOB column resides (You have to create such a lookup first :wink:)

So the data of your blob are retrieved on-demand by the lookup you have defined in your blob control widget.

Maybe I will add screenshots in the future too.

Hi Vaclav, will your add some screenshots? Thanks in advance.

On the first picture you can see a blob entity field (Blob) with ExcludeFromallFields and DefaultLookup set within RentalObjectAttachment entity.

On the second picture you can see a data structure with RentalObjectAttachment entity and blob column explicitely specified with WriteOnly set to true.

On the third picture you can see a screen section for RentalObjectAttachment entity with a detail view of blob control property with BlobLookup set.

On the fourth picture you can see the lookup returning blob data as a value. The lookup can be easily created by right-click on RentalObjectAttachment entity and selecting “Actions” → “Create Lookup…” and then select blob field as a “Display Field”.

2 Likes