Want to create a Case statement to input a graphic into a Container field. Graphic resides on another layout. How do I accomplish this? I am working on FM Pro v. 11
Remove the GetField functions. This function doesn’t do what you think that it does.
Case ( property = “Dartmouth Rental” ; container 1 ; and so forth...)
Also there are more flexible ways to do this that use a table of images and do not use Case. Your current method requires design changes every time you need an image for a new value for property. A table based set of images would enable managing such changes simply by adding more records to that table of images.
It's not entirely clear from your question what the source of the graphic is. If the graphic is an object on a layout, you will not be able to insert it into a container field via a calculation. You would need to create a series of either records (preferred) or fields with the choices you want in container fields, and then use the Case statement to choose between them.
Perhaps a bit more detail on exactly what you're trying to do would help.
twmissmt wrote:Graphic resides on another layout. How do I accomplish this?
Graphic resides on another layout. How do I accomplish this?
Graphics do not reside on a layout, but are saved in a field which is in table - unless it's different in 11.
Are the two layouts based on related table ? If so you could diaplybthem in a portal on the other layout.
I have three graphic, each within it's own Global field (Container 1,2 and 3). When I put a value into and address field I would like to have the appropriate graphic show up. This is what I have so far;
Case ( Property = "Dartmouth Rental" ; GetField ( Container 1 ) ; Property = "Edgewood Rental" ; GetField ( Container 2 ) ; Property = "Signature Condo" ; GetField ( Container 3 ) ; "" )
I have three graphics, each within it's own Global field (Container 1,2 and 3). When I put a value into and address field I would like to have the appropriate graphic show up. This is what I have so far;
First, what you describe is one of the legitimate ways to use a repeating field—storing your graphics in a single field with repetitions rather than three separate fields. That, however, is a minor point.
To you methodology, there appears to be nothing wrong with your Case logic, so if it is not working (and you didn't actually say it isn't) look at the test conditions. Could the presence of the word "Rental" in both be messing you up? Try using PatternCount ( Property ; "Dartmouth" ), and PatternCount ( Property ; "Edgewood" ), PatternCount ( Property ; "Signature" ), instead.
Awesome, that did it! Thank you so much philmodjunk!
Have you tried it without the GetField function?
Retrieving data ...