I am getting some results that do not seem consistent. I want to move several 
gigabytes of data from storage outside the database managed by 4D to in the 
record. The field in question is a 4D Write picture field. There are 56,000 
records each containing up to 6 jpg images.

If I call GET EXTERNAL DATA PATH before I save the record, I get the path to 
4D’s default storage folder.

If I then modify the record, not the image, in the input form and save it, a 
call to GET EXTERNAL DATA PATH returns an empty string.

So far this is what I expected.

Now if I run a for loop through all the records modifying a field in each 
record then call GET EXTERNAL DATA PATH on one of the images, I get the path to 
the default storage folder instead of an empty string. I think this is telling 
me that the for loop did not change the storage location. I am certain the 
dirty flag is getting set as the table trigger is firing on each save.

Here is the for loop I am using…

$size:=Records in selection([Letter])
For ($i;1;$size)
        GOTO SELECTED RECORD([Letter];$i)
        
        ALERT(Get external data path([Letter]Letter_))   //returns path to 
default data storage folder

        [Letter]Modified_Time:=Current time(*)
        SAVE RECORD([Letter])
        
        ALERT(Get external data path([Letter]Letter_))  //returns path to 
default data storage folder

End for 

What am I missing?

Thanks,

John
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to