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

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

Recommended Posts

Posted

I would like to build a script that allows the user to insert a picture into a container field.

I think I want to use the [color:blue]Insert Picture script so I can be sure they only install a link to the image. But here is where I have an issue.

I would also like to direct the user to a specific folder defined by the script, containing specific types of images suitable for the container field.

The [color:blue]Set Path part of the script does not allow me to set a particular folder where the user can pick the correct image, only a specific image.

I know I can leave the [color:blue]Set Path part blank and let the user navigate to it, and there is no way to stop them from navigating away from it, but I would at least like to start them off in the correct folder.

How do I set the path (relative because the folder with the images resides with the FMP doc), not a specific image, but just the directory.

Thanks for the help in advance.

  • 2 weeks later...
Posted

Hi,

You could achieve this using the set variable step. If you create a new field in filemaker called Path, then in this new field enter the path to the images in the following format user/Desktop/Images/ (obviously, this path is for information only).

Then in your script, after you have specified where you want the image pasted, choose the set variable script and in the options set the name as $Path (Note:the name must be spelled the same as the field name, as it is case sensitive)and for the value choose the new field you have created. Then select the insert picture script step and do not select specify source file. When this script is run,the set variable part, will take the user to the folder location you have defined in the new field called Path and they can then select the image to be inserted.

Tested and works for me using Filmaker Pro 9 Advanced on Mac OS X 10.5.2.

Regards,

Sdig.

Posted

Another option is to use a text field 'Image_id' linked to your Container, e.g.'_Image_id'. Insert in Field Names, Options,'Auto_Enter', 'Calculated Value'; "imagewin:/"& $$id &"/"& Image_ID &".jpg". The merged value finds the image.

You can set the global variable using;'Set Variable [$$id; Value;"path/folder"]' or as suggested.

I placed the global variable script in 'File', 'File Options', 'Perform Script', 'Specify'. that loads on log-on.

'Image_id' allows you to enter the value of the image you want to link or find.

Posted

WOW !

That is really cool.

I am constantly amazed by the knowledgeable people on this forum. It works great.

Thank you.

This topic is 6047 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.