DaveSamson Posted July 13, 2005 Posted July 13, 2005 I have a series of buttons that pull up different subsets of the same data. If a button would query a null set, I want its color to be gray-out. Is this possible?
RalphL Posted July 13, 2005 Posted July 13, 2005 Welcome to the forum, Make the button a container field. Make global container fields to hold images of the buttons you want to use. Then make the container = to the global field of choice to get the desired color.
DaveSamson Posted July 14, 2005 Author Posted July 14, 2005 After so many years of writing SQL I'm struggling to convert my logic into FM. In order to determine whether a button should be grayed-out, I want to determine if the value even exists in the table. A simple one line SQL would answer the question for every unique value, but in FM, do I need to do a find for each value and then interrogate those finds for my values?
DaveSamson Posted July 14, 2005 Author Posted July 14, 2005 Let me put the plan out here: I have a matrix of buttons on a dashboard layout. Pushing any button will bring up the records belonging to that group. If no records exist, I want the button dimmed and inactive. In the field (button), I want to calculate the existance or nonexistance and then use that to populate the field with the correct color. My question: What's a good calculation to do this? Thanks
Søren Dyhr Posted July 14, 2005 Posted July 14, 2005 So it's the determination more than the actual visualization, that cuases the question?? There exist several ways to store a found set, but as I see a solution to your problem must it be something along the lines of this: http://www.filemakermagazine.com/showmovie.php?ID=550&T=preview&N=PortalResults_full.mov This principle gathers the ID's in a keyfield and in your case is a relation needed for each keyfield, the buttons appearance "in full bloom" or grayed out is determind on the counting of related records to each relation. But a better way exists ...a oneline portal around the button for each relation. This is the implementation of the visibility trick: http://www.filemakerpros.com/MoreVis.zip ...but the grayed out buttons underneath needs to be sized larger than the portal, but even though centered and the button in itself shouldn't be larger. This is done by screencapture of grayed out button edged with enough with the background behind to make a size larger than the portal. This makes the grayed out appeare when no records exists, and obviously isn't any script attached to other objects but the button in the portal that dissapeares. Another issue is the tampering with the clipboard - measures must be instated to save whats in it at the start of the script as well as restoring the matters that where there initially. Would you like me to make a template, or can you make it work on my dscription?? Then is the question, would I do it that way or are there provisions for doing it another way??? Yes ...with filemaker is there usually 2-3 other ways to accomplish the same task, it's only a matter how willing the developer is to drift away from his/her initial idea, and if I were to make the task you've at hand would I instead use this principle: http://previews.filemakermagazine.com/videos/544/SavedSearches_full.mov Because it makes it posible to find records matching a criteria, but originate from time after the saved search was made. But it defeats the original graphic issue to display an empty querry - so you have to deside which is most important to make saved searches clickable or loose records created after the found set is established. --sd
sbg2 Posted July 14, 2005 Posted July 14, 2005 After so many years of writing SQL I'm struggling to convert my logic into FM. In order to determine whether a button should be grayed-out, I want to determine if the value even exists in the table. A simple one line SQL would answer the question for every unique value, but in FM, do I need to do a find for each value and then interrogate those finds for my values? Very basic, stripped down example attached. I did not change the color of the button but rather changed the text that was displayed, and the color of that text. When a user presses the button and there are no sub-set of records (as in ID_Order # 3 of my example) the script is set to do nothing. Hopefully that gets you started in the right direction. There are no attributes for Visible/Invisible, Enable/Disable or BackColor in FMP. DisableButton.zip
Søren Dyhr Posted July 14, 2005 Posted July 14, 2005 There are no attributes for Visible/Invisible, Enable/Disable or BackColor in FMP. Well my posts didn't make much sence apparently, checkout the changes I made to your file... --sd DisableButt.zip
sbg2 Posted July 14, 2005 Posted July 14, 2005 Well my posts didn't make much sence apparently, checkout the changes I made to your file... --sd No, for once your post did make some sense to me and I have used the technique you describe in some of my solutions. Its a nice trick but is yet another not so intuitive workaround for such a simple problem. Even knowing beforehand what you had done it took more than a few minutes to reverse engineer it. I stand by my statement that "there are no attributes for Visible/Invisible, Enable/Disable or BackColor in FMP". You can use work arounds to make an object be Invisible/Visible or Enabled/Disabled (using a portal & relationship), you can also use a second graphic to fake the appearence of changing the BackColor but you can not change the mentioned attributes of an object.
Søren Dyhr Posted July 15, 2005 Posted July 15, 2005 but you can not change the mentioned attributes of an object. Yes it's bad that only a relation that can make it to work, which have severe syncronization issues with the found set at hand. But lets look isolated at buttons isntead, just as you made the text change attributs is it posible to build a button say an OS X aqua one with multiple slightly offset versions of the same merge field or set of mergefields, in a gradient change of colours. Some days ago did I make a template that took a point in this video ad notam. http://previews.filemakermagazine.com/videos/579/BetterInterface.mov ...namely that jpg's pasted on the layout slows down a multiuser solution because it's much easier to send a command to the client that instructs draw a line from a to b than sending a detailed image when in demand. Now aren't the icons to flip sortorder over a portal particular large, when it comes to it. But it might be just the detail needed that makes an otherwise slow rendering solution bearable. At least does it get rid of the repeating global field for the storage of the images. Admitted it requires spit and polish to make it work if embossing and other 3D'ing are required ...but investigate/reverse engineer the template attached --sd AscDsc.zip
sbg2 Posted July 15, 2005 Posted July 15, 2005 What I do notice is that Filemaker is slow in the rendering department. whether it be text, raster or vector graphics IMO it seems slow. Clicking a button is also slow to execute as are pop-up lists.
Recommended Posts
This topic is 7072 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