Alpha DevCon 2018
Results 1 to 3 of 3

Thread: List Detail view - How to remove databound image(blob)

  1. #1
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default List Detail view - How to remove databound image(blob)

    Hi all,

    Do any of you know how to clear or remove an image that is normally stored in the sql table as blob. By this I mean how to clear the image field before the list is synchronized back to the server.

    Have tried different things, there is a action called Image delete. But it doesn't work with detail view.
    Also a javascript function lObj.updateTableRow, that seems to works on other fields but not on the image field. When the list is refreshed it gets the original image from the database again.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,674

    Default Re: List Detail view - How to remove databound image(blob)

    Images and Dates... just a pain... no matter what development environment.

    I'll bet there is a better way to do this... but...

    Clearing an image doesn't seem to trigger all the "dirty" processes that other field types go through... probably because it's kind of a 2 part element. So... let's do it manually...

    Code:
    {dialog.object}.deleteImageOrAttachment('IMAGE');
    var imageHidden = $('{dialog.ComponentName}.V.R1.IMAGE_HIDDENA5FN');
    imageHidden.setAttribute('a5isdirty','true');
    Change 'IMAGE' in the code to your control name.

    At .setValue() or .deleteImageOrAttchment() method works nicely to clear out the image. There is a "hidden" element to the Image as well... and it does get cleared... but does not get set dirty.

    So... let's go after the "a5isdirty" attribute of this hidden image control... and change it to "true" from "false".

    Once that's done all the 'dirty' processes fall in line and the Save button is enabled.

    Clearing an Image and Saving it does write a 70 byte empty image value to the table... just to be aware.

  3. #3
    Member
    Real Name
    David Hagen-Sørensen
    Join Date
    Jul 2013
    Location
    Denmark - Odense
    Posts
    66

    Default Re: List Detail view - How to remove databound image(blob)

    Thanks David,

    Great, That work just the way it should.
    Kind regards
    David H-S

    Using: Alpha Anywhere V12

Similar Threads

  1. List/Detail View with List Dynamic Image
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 08-29-2016, 05:24 PM
  2. Replies: 1
    Last Post: 05-26-2015, 11:02 PM
  3. Image capture in List Detail View works on desktop but not mobile device.
    By edsicard in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 05-05-2015, 04:15 PM
  4. Image capture for list detail view
    By lilmofo812 in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 03-09-2015, 04:58 PM
  5. Replies: 12
    Last Post: 10-18-2014, 04:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •