0

How to read/copy the file name of a picture in an image container

I need to copy the file name of an image in an image container into another field 

how to do that?

5 replies

null
    • blackie
    • 5 yrs ago
    • Reported - view

    You can get the image name with a formula like this:

     

    let path := text(Image);
    substr(path, index(path, "/") + 1)

    • Vos
    • 5 yrs ago
    • Reported - view

    Great. Thanks

    • Producer, Manager
    • Jan_Inge_Iversen
    • 2 yrs ago
    • Reported - view

    Is it also possible to get the location where the file is on the hard disc?

    • blackie
    • 2 yrs ago
    • Reported - view

    The first line of the example code will put it in the "path" variable.

     

    or just do

    text(Image)

      • UKenGB
      • 1 yr ago
      • Reported - view

      blackie As of v3.7.14 on Mac, all you get is the file name and a single path component like K66/image.jpg. The K66 part is some form of encryption to a folder with a unique ID (like C9JA3n8PcuXg) in folder 'K' in Ninox's db folder. So while you can construct the first part of the path and the last component (i.e. file name), the file's container folder is obscured, so the location is impossible to ascertain or use in any meaningful way in a script.

      I have to say this sort of carry on really annoys (I refrain from using a stronger word). Why obscure the location of something so innocuous as image files and make life hard for everyone. I wouldn't mind so much but Ninox is incapable of copying images within the database, no doubt due to this which also makes it impossible to do anything with them in a script. Almost seems like they being deliberately difficult.

Content aside

  • 1 yr agoLast active
  • 5Replies
  • 1728Views
  • 1 Following