June 24, 201015 yr (Mod: I wasn't sure this question should go into Scripts or Importing/Exporting, so feel free to move my post as you see fit.) I want to create a script that will allow the import of only .jpg or .png files into a container field. How do I code the script's step(s) so it will look at the file extension upon import? If the imported file isn't .jpg or .png is there a way I can use FMP error code 700 as a trap?
June 24, 201015 yr Hi you have to set the Validation option of your container field to ALWAYS validate by calculation: not IsEmpty ( FilterValues ( Right ( Self ; 3 ) ; "jpg¶png" ) ). From now on, nobody can import something different into that field.
Create an account or sign in to comment