If users insert an image in a container field I reduce the size of the file by using the auto-enter calc...
GetThumbnail ( Self ; 600 ; 900 ) )
which works a treat and reduces a 2GB file down to 200MB.
However when its a pdf I get "?" in the container field. Which I gather is an issue in FM13 (FM12 and FM 14 allows thumbnails of pdfs). But I'm not too concerned about that as only a few are pdfs.
So what I want to do is if it's a pdf, then insert the original pdf, and if it's NOT a pdf then GetThumbnail.
So I did the following, which doesn't work. It inserts a thumbnail of any image ok but I still get a "?" with a pdf
If ( PatternCount ( File_Name ; "pdf" ) = 1; "" ; GetThumbnail ( Self ; 600 ; 900 ) )
Any suggestion gratefully received