dbTalk Databases Forums  

show different pictures/grapics

comp.databases.filemaker comp.databases.filemaker


Discuss show different pictures/grapics in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pri
 
Posts: n/a

Default show different pictures/grapics - 06-23-2005 , 10:35 AM






hey is it possible in FMP 7 to show a field containing a grapic of some
sort. For example, i would like to show a symbol dependent on a popup
menu. So if one chooses A, then symbolA shows up, for B symbolB shows
up, and for C symbolC shows up. All three symbols are in different
fields but are placed in the same position in the layout. So i want to
know if theres a script i could run that would bring one field to the
top depending on the choice(soemthing like what you can do in layout
and arrange things in a specific order back to front).

i know that the sbove exmplae can be done easily using a relation, but
my tables are more complicated and could not be easily related that
way. But thanks for your help in advance.


Reply With Quote
  #2  
Old   
42
 
Posts: n/a

Default Re: show different pictures/grapics - 06-23-2005 , 12:11 PM






In article <1119540906.795233.324710 (AT) g44g2000cwa (DOT) googlegroups.com>,
priyankc (AT) gmail (DOT) com says...
Quote:
hey is it possible in FMP 7 to show a field containing a grapic of some
sort. For example, i would like to show a symbol dependent on a popup
menu. So if one chooses A, then symbolA shows up, for B symbolB shows
up, and for C symbolC shows up. All three symbols are in different
fields but are placed in the same position in the layout. So i want to
know if theres a script i could run that would bring one field to the
top depending on the choice(soemthing like what you can do in layout
and arrange things in a specific order back to front).
1) Just define a calculation container that equals the contents of one
of several global containers based on your criteria.

2) You could also do this via script, Setfield(container, if x>b,
globalcontainerA, globalcontainerB)...

3) Third, you could do it via a relation. Put the images and key field
in a table, relate the on the key, and display the related image.

Quote:
i know that the sbove exmplae can be done easily using a relation, but
my tables are more complicated and could not be easily related that
way. But thanks for your help in advance.
This is the first time I've ever heard someone say their database was
too complicated to use relations.

Complicated databases use relations. If your database is too complicated
to use a relation you may want to revisit your database architecture.


Reply With Quote
  #3  
Old   
pri
 
Posts: n/a

Default Re: show different pictures/grapics - 06-23-2005 , 02:03 PM



hey! it worked. I used suggestion no.1

now i wanted to ask you how could i do this in a portal. I have a
portal that is dependent on a field. Right now i have two layouts that
are exactly similar but witht that field changed. Could i change the
field in the portal with just a calculation or something similar?

TIA


Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: show different pictures/grapics - 06-23-2005 , 02:17 PM



I covered this very thing only a few days ago, answering your earlier
question about how to display a male or female symbol depending on which
sex was selected.

It's the same process:

Put your various images in global containers.

Define a single calculation field (returned as container):

ImageField = Case (

SelectionField = "apples" ; g.ImageApples ;

SelectionField = "oranges" ; g.ImageOranges ;

SelectionField = "kiwi" ; g.ImageKiwi ;

"" )

Place ImageField as you wish on your layout, once.

It makes no difference how the value of SelectionField is selected.
Checkbox, radio button, popup, dropdown. The result is the same.

Yes, you could do it with a script, but doing it from a popup would
require a plugin to trigger the script upon change to the selection field
(either EventScript or zippScript, both free), but in the end, the script
is going to set ImageField according to an If or Case calculation like the
above. A straight calc field is much simpler, more fitting to the task.

Matt



On 6/23/2005, pri wrote:

Quote:
hey is it possible in FMP 7 to show a field containing a grapic of some
sort. For example, i would like to show a symbol dependent on a popup
menu. So if one chooses A, then symbolA shows up, for B symbolB shows
up, and for C symbolC shows up. All three symbols are in different
fields but are placed in the same position in the layout. So i want to
know if theres a script i could run that would bring one field to the
top depending on the choice(soemthing like what you can do in layout
and arrange things in a specific order back to front).

i know that the sbove exmplae can be done easily using a relation, but
my tables are more complicated and could not be easily related that
way. But thanks for your help in advance.

Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: show different pictures/grapics - 06-23-2005 , 03:55 PM



In article <1119553392.121060.312110 (AT) o13g2000cwo (DOT) googlegroups.com>,
"pri" <priyankc (AT) gmail (DOT) com> wrote:

Quote:
hey! it worked. I used suggestion no.1

now i wanted to ask you how could i do this in a portal. I have a
portal that is dependent on a field. Right now i have two layouts that
are exactly similar but witht that field changed. Could i change the
field in the portal with just a calculation or something similar?
A portal simply shows fields from another file / table. Those fields
can be anything in the other file / table, including Container fields
or Calculation fields - but the calculations are done in the other file
/ table, not the one using the portal (the exceptions being a script
that loops through portal records or summarising a portal using
functions like Sum). Then it's just a matter of making the portal row
big enough or the field small enough to fit in the portal row.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #6  
Old   
ursus.kirk
 
Posts: n/a

Default Re: show different pictures/grapics - 06-24-2005 , 04:12 AM



AND on top of all, you dont need to store the images in a global field with
FMP7

Put your images in a folder
Use a calculation, set the result to container

case (
MyField = 1 ; "image:PathToPict/Pic1.jpg;
MyField = 2 ; "image:PathToPict/Pic2.jpg;
MyField = 3 ; "image:PathToPict/Pic3.jpg )

This has, as all solutions, pro's and cons

Ursus

"pri" <priyankc (AT) gmail (DOT) com> schreef in bericht
news:1119540906.795233.324710 (AT) g44g2000cwa (DOT) googlegroups.com...
Quote:
hey is it possible in FMP 7 to show a field containing a grapic of some
sort. For example, i would like to show a symbol dependent on a popup
menu. So if one chooses A, then symbolA shows up, for B symbolB shows
up, and for C symbolC shows up. All three symbols are in different
fields but are placed in the same position in the layout. So i want to
know if theres a script i could run that would bring one field to the
top depending on the choice(soemthing like what you can do in layout
and arrange things in a specific order back to front).

i know that the sbove exmplae can be done easily using a relation, but
my tables are more complicated and could not be easily related that
way. But thanks for your help in advance.




Reply With Quote
  #7  
Old   
Matt Wills
 
Posts: n/a

Default Re: show different pictures/grapics - 06-24-2005 , 07:16 AM





On 6/24/2005, ursus.kirk wrote:

Quote:
AND on top of all, you dont need to store the images in a global field
with FMP7

Put your images in a folder
Use a calculation, set the result to container

case (
MyField = 1 ; "image:PathToPict/Pic1.jpg;
MyField = 2 ; "image:PathToPict/Pic2.jpg;
MyField = 3 ; "image:PathToPict/Pic3.jpg )

This has, as all solutions, pro's and cons

Ursus
Yup, didn't even think of that.

Matt


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.