Paolo Posted July 8, 2003 Posted July 8, 2003 Is it possible to create a container calculation and set its formula to display an image ? I think that a properly formatted string as the formula of a calculation container would result in displaying an image. I think it is possible, I'm sure it is... The only problem is that how to format the string is not documented! Any comment?
Clint Posted July 8, 2003 Posted July 8, 2003 I don't know about doing it as a calculation, but it was fairly easy as an applescript. And this way the pictures are easily changed. If you want to get creative, I'm sure a calculation could be used within the script to set the pictures. In this example the container field is named "picture", the field "path" is text containing the path to the file for that record. Just make a Script with one action of performing an Applescript, then enter the script below tell application "FileMaker Pro" activate repeat with x from 1 to count of records go to record x set (cell "picture" of current record) to (file (cell "path" of current record)) set (cell "count" of current record) to x end repeat end tell
Lee Smith Posted July 8, 2003 Posted July 8, 2003 Hi Paolo, Yes you can. Look at the "Calculation Result Is" Pop Down menu below the calculation box. HTH Lee
LaRetta Posted July 8, 2003 Posted July 8, 2003 Hi Paolo, You will need two fields to accomplish what you ask. The first would be a container field. You can use either standard container (different for every record) or a global container. These containers can also be repeating fields. For example, to conditionally display one of two button sets depending upon your calc condition you would: Create a global container (gButton_gui) with two repetitions. Paste each button in the rep. Create a calculation (container) with the following: Case(Status( CurrentRecordNumber) = 1, GetRepetition( gButton_gui, 1), Status( CurrentRecordNumber) = Status( CurrentFoundCount), GetRepetition( gButton_gui, 2)) Place this calculation container on your form where you want the graphic to conditionally display, instead of placing your original container. LaRetta
Ugo DI LUCA Posted July 8, 2003 Posted July 8, 2003 Is it possible to create a container calculation and set its formula to display an image ? Isn't this the unique purpose of a calculation (container result) ? What exaclty is the problem you're having Paolo ?
Paolo Posted July 8, 2003 Author Posted July 8, 2003 Yes, but I want to do something more. Actually the only documented operations that produce a result on a container field are Container="" (empty) Container = anotherContainer If you set the container to, for example Container = "ABC" it doesn't produce any result. But I was wondering if a properly formatted string, in place of "ABC", would produce a graph, a sound or a formatted text inside the container. BTW: I've seen a demo that could make graphs and charts without plugings. Unfortunately I didn't have the password to see how that was accomplished.
Lee Smith Posted July 8, 2003 Posted July 8, 2003 They still use a container field and the results of a calculation field produces the chart length. There are a few open demos available at www.fmfiles.com Here is one I developed a long time ago in version 4, it should covert to 5 if you need to, without any problems. HTH Lee Timelines.fp3.zip
Fitch Posted July 8, 2003 Posted July 8, 2003 "... wondering if a properly formatted string, in place of "ABC", would produce a graph, a sound or a formatted text inside the container." No, but that's a cool idea for a plugin!
LaRetta Posted July 8, 2003 Posted July 8, 2003 Hi Paolo, Actually, you can use a calculation to display your graph by placing the calculation in the body of a report. The calc could contain ||||| or anything you wish. A good example (Room Availability Overview) was created by Ray (CobaltSky) which displays a very nice graph showing rooms booked by date range. His file attachment is on page 2 of this post: Room Reservations Text can not normally be placed in containers; however, if you create a button, put your text on the button and format the button as transparent line and fill then paste into a container, your text will become a graphic and can be displayed. Or you can use a transparent rectangle grouped to your text. LaRetta
Ugo DI LUCA Posted July 8, 2003 Posted July 8, 2003 Ciao Paolo, I must admit I'm still wondering what you would do with that ABC string... You may also have a look at Russ Baker and Christian Jaeger Demos posted in the Sample section here. One uses QuickTime, the other is FMBuilt. Just in case, you might also visit http://www.fmfiles.com/tnt2.html and download a file called SetRep, which has sounds, repeating fields and a bunch of containers. At least for fun.
Paolo Posted July 9, 2003 Author Posted July 9, 2003 Thank you, I'll take a look at the examples you pointed me to. Just to be more clear, I was wondering if it is possible to generate a vector graph or a sound on the fly using just filemaker. Btw. I don't like much graphs generated with |||| or ___ . These techinques were good in the 70's, not in the age of mac and filemaker!
RussBaker Posted July 10, 2003 Posted July 10, 2003 Paolo, The 2 samples of mine that Ugo referred to are at: http://www.fmforums.com/threads/showflat.php?Cat=&Number=43001&page=0&view=collapsed&sb=7&o=&fpart=1 for the "RussCalcs from Oz" file in "Handy Bits" which has an example under the Bar Graphs tab of how to use multiple "|" character graphs to produce a mean, +/- SD and Min/Max bar graph, and http://www.fmforums.com/threads/showflat.php?Cat=&Number=68888&page=3&view=collapsed&sb=7&o=&fpart=1 for an example of a highlited histogram. Download the file attached to the third post in this thread which starts off with "OK - Enough Already". This sample is where a particular record can be highlighted against the remainder of the histogram, with a text description on the graph of that record's characteristics. I don't particularly like using the "|" either but why inflict a plug-in on a user if they don't need to buy it? Also - try duplicating the full range of features of the hilighted histogram in something like Excel and see how far you get.
Lee Smith Posted July 10, 2003 Posted July 10, 2003 [color:"blue"]> Tip: Use of the Haettenschweiler font provides a high-resolution (1 pt) graph Never heard of this one, is it readily avaliable for free for both platforms? Lee
LaRetta Posted July 11, 2003 Posted July 11, 2003 Hi Paolo, Btw. I don't like much graphs generated with |||| or ___ . These techinques were good in the 70's, not in the age of mac and filemaker! I just wanted to mention something about this, if I could ... If you view the demo referenced above 'Reservatons' and see the graph (created with |||, I think you'll be quite surprised on how good it looks! Also, it's not always feasible to have a special font installed on each system, particularly if you share your dbs. This technique would allow anyone to view the graph. Macs ... yes, I'm sure you are right. Macs are great at this sort of thing, I hear. However, not everyone has a Mac and many solutions need to be x-plat nowdays. Just a thought! Cheers, LaRetta
Recommended Posts
This topic is 7876 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 accountSign in
Already have an account? Sign in here.
Sign In Now