0

Thoroughly delete image elements with code

I have image elements in a table. I found that using the code "Images:=null" does not completely delete the images. How can I use code to completely delete them?

 

7 replies

null
    • Fred
    • 8 mths ago
    • Reported - view

    Take a look at this post.

      • gold_cat
      • 8 mths ago
      • Reported - view

       thanks Fred

      • gold_cat
      • 8 days ago
      • Reported - view

       

      Hi Fred, can the latest function directly delete images now? (Previously, after setting Image := null, the image file would still be saved in the database, just not displayed.) Is there no need to use the old API to delete images anymore?

      • Fred
      • 7 days ago
      • Reported - view

      Well Ninox says:

      To fully clear the file reference from an Image field, you need to manually set that Image field to null using scripting, such as:

      removeFile(Image);
      Image := null;
      

      So as long as you do both you should be OK.

      • gold_cat
      • 7 days ago
      • Reported - view

       thank you

    • Ninox partner
    • RoSoft_Steven.1
    • 8 mths ago
    • Reported - view

    And for the code and an example database here. 😉

      • gold_cat
      • 8 mths ago
      • Reported - view

       thanks Steven

Content aside

  • Status Answered
  • 7 days agoLast active
  • 7Replies
  • 98Views
  • 3 Following