Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
  • 0
Fulano

Copy images from Webviewer

Question

Fulano

I have made dynamic charts to display data using Google Charts in webviewers.

After much tunning all is working exactly as I wanted.

For example:

http://chart.apis.google.com/chart?cht=lxy&chs=600x400&chco=0000FF&chxt=x,y&chxs=0,551A8B,14|1,551A8B,14&chf=bg,s,FFFACD|c,s,FFD700&chls=4,1,0&chd=t:17.98,17.21,16.51,15.6,14.69,13.85,12.94,11.96,11.05,10.14|.13,.73,.63,1.25,.13,.23,.48,.12,.07,.5&chds=10.14,17.98,0,1.25&chxr=0,10.14,17.98|1,0,1.25&chxl=0:|9-2007|12-2007|3-2008|6-2008|9-2008|12-2008|3-2009|6-2009|8-2009|11-2009

 

In this example I used for the x axis (time) the number of days since 1/1/2005 divided by 100.

 

Google returns png images.

I can right click in an image in a webviewer and copy it from the context menu to paste it anywhere inside or outside Filemaker.

 

What I need is a script step to do that copy.

It appears simple...

I've twisted my brain without coming to a solution...

 

As the charts are dynamic when data is updated the graphic changes. That's exactly what I want.

But it's useful also to store (in a container field) some instances of the chart (png images) that will not repeat in the future!

It can be done manually... But with hundreds of records a script is definitely better!

 

Thanks in advance for any help you can give!

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
AHunter3

Have you considered saving as PDF to a specified filepath then setting container field to that very path?

Share this post


Link to post
Share on other sites
  • 0
Weetbicks

What I think AHunter means is having a special layout that contains just the web viewer displaying the graph. You go to that layout, and use the "Save as PDF" option, choosing to only save the current record only. This will get you a PDF file on disk, which should be 1 page long only, and contains the graph. Then you insert the PDF into a container field, either via reference or direct from the path?

 

If you insert a PDF file into a container and it only has 1 page, you should see a preview of that page in the container. (either that, or if you insert it as a picture instead of a file, I can never remember which of the two it is).

Share this post


Link to post
Share on other sites
  • 0
Fulano

Thanks for your help!

It's a twisted way of doing what should be a simple thing... but it works!

 

The impossibility of doing it the natural way is definitely a bug in Filemaker!

Since they are too lazy to implement a graphic module that is missing for years, at least they should facilitate the interaction with Google Charts!

Share this post


Link to post
Share on other sites
  • 0
AHunter3

You can save as many legacy records as you want to containing the current field values so you can reload the old results in the web viewer at any time going forward. And it would take less room than storing the image itself.

Share this post


Link to post
Share on other sites
  • 0
Techphan
(either that, or if you insert it as a picture instead of a file, I can never remember which of the two it is).

 

OK, Weetbicks, you raised an interesting point and reminded me of some fun I was having a few months ago. I was "playing around" - trying to find the best way to save computer files (Word, Excel, PDF, JPG) in containers. I tried both "drag and drop" from a windows explorer window and secondly placing the cursor in the container and choosing the command "insert file." To my surpise there was a difference (but I cannot recall whcih way was which). One method involved actually "seeing" the file in miniature while the other way I saw a graphical representation of the file type.

 

It seems to me that there should be no difference. Maybe a change for v11 (or if it is really "finished" then v12)?

Share this post


Link to post
Share on other sites
  • 0
Weetbicks

I think Insert Picture shows the preview as it most likely makes a mini preview thumbnail in addition to the original image. Container fields I think contain a few "streams" - the original image, thumbnail preview, filename, file stats etc... Insert picture might do the thumbnail, but insert file probably doesn't, though I'm not 100% on that…

 

To be honest I've never tried inserting an excel/word file as a "Picture" , can you retrieve it via export field contents?

Share this post


Link to post
Share on other sites
  • 0
Techphan

I have not tried that yet... Clicking on the file on either type of save brings up the file with its native program (Word, Excel, etc.).

 

I have never use "export field contents." Would that just copy the file to another location or ...?

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use