We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Filemaker import picture.

ALASKASTREETMASTER
on
Medium Priority
1,042 Views
Last Modified: 2012-05-11
I am able to right click in a container field and "import" a picture from a web address. That works great.  However, when I use a script to do the same thing it says no file is available.  Any ideas?
Comment
Watch Question

Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
Actually, I'm interested to know how you are specifying a web address in the "Insert Picture" dialog. Unless you are referring to a shared drive across a WAN, I don't know of any way to specify an "http://..." web address for an image to Insert.

You can do this with the Troi URL plugin - http://www.troi.com/software/urlplugin.html - and if you are on a Mac, you can do this via an Applescript. See:

http://fmforums.com/forum/topic/44415-insert-image-from-url/

It can also probably be done using Visual Basic, but I you'd have to ask a VB person.
Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
Per our previous discussion about copying the image from a webviewer you can use a script to do this. First, in the Inspector -> Position tab -> Name area, give the web viewer object a name, I'll call it "WebViewer1". The make your script as follows:

Go to Object [Object Name: "WebViewer1"]
Copy []
Paste [Select; SomeTableName::Photo]

If you wrap that in a loop with a Go to Record [Next; Exit After Last] it will process a group of records, or you can make a button next to the web Viewer that will do the function on one record.
Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
One other note. The above script won't work properly unless you tick the "Paste Without Style" checkbox on the Paste step.

Author

Commented:
I right click on the container field then select insert picture. A dialog box pops up and I enter the http address to the server such as http://12.34.567.890/images/image.png and the image pops right in. I just tried it again and it worked. Seems like we should be able to do the same in a script.

I will try the copy and paste script.
Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
The ability to use a URL with Insert Picture appears to be a Windows only feature, at least I'm not able to find a way to replicate it on the Mac. It works fine on Windows, but as you say, I'm unable to find any scripted way of using a URL. My testing process is basically a two step script:

Set Variable [$FilePath ; "http://12.34.567.890/images/image.png"]
Insert Picture ["$FilePath"]

I've tried (on Win and Mac) a number of possible strings including beginning with and without "imagewin:/", "imagewin://" but I've not been able to find any combination that does not produce a number 3 error code. Since using a URL even manually appears to be only supported on Windows, my guess is that it's not supported in scripting.

I've been a long time user of Troi plugins and have developer licenses for several of them. Unless there is some undocumented way to make this work, I would suggest either using the Troi URL plugin, which does exactly what you want (and you can test it for free) and use the Copy/Paste from a Web Viewer method.

Author

Commented:
I still can't understand why we cannot see images from the remote database that are inserted with the "reference only"  option.  Sure makes for a headache.

I tried inserting the picture from the http:// as a reference only.  The picture came in fine, but when I used GetAsText(container) it was linked to the picture in the temporary internet folder. It downloaded it then linked to it. I was hoping it had some slick way to reference a file on the server. haha, no such luck. I am going to try the copy from web viewer and paste script and see what happens.
Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
You can't see them because FM doesn't support it. It only supports referenced images on a local or network volume. Your experience inserting a picture using a web address and as reference, I think only reinforces this fact: FM had to download the image to the temp folder on the local drive in order to have it be local so it can reference it.

Author

Commented:
that did not work either. got an error code 3 on the paste step. I can manually copy it and paste though. I did select the paste without style option.  

I also halted the script after the copy step and then tried to manually paste and there was nothing there. It may not be copyig either.  I do have allow interaction selected on the webviewer and verified the webviewer name was entered correctly.

Author

Commented:
i was able to manually copy the web viewer then use the paste script step to paste it into the image field.  It appears the copy step does not work.
Will LovingPresident, Dedication Technologies, Inc.
CERTIFIED EXPERT

Commented:
Ok, this is really starting to annoy me ;-D

I had Copy/Paste script working last night but now it's now working (so maybe the image was already on the clipboard and I didn't realize it).

You CAN drag and drop from the web viewer to the container field...
President, Dedication Technologies, Inc.
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
If I try to drag and drop the image i get a popup that asks if the first row is to be used for data or field names. how bazzar.

I can copy then paste.

I am installing the plug in now. Seems like a powerful product. Can it parse fields from a data request?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.