Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5266 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

(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?

Posted

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.

This topic is 5266 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.