14 Replies Latest reply on Nov 12, 2010 8:19 AM by philmodjunk

    Solid checkboxes?



      Solid checkboxes?


      I am creating a database that will have different checkboxes filled in by me for each entry (from a choice of about 20 different items) for each record. Some records will have several items selected.

      I really don't know what I'm doing, but kind of got it to work, using the checkbox function. It allows me to check the box on and off in the record.

      BUT I'd like the box to fill in solid, not just be an "X". I think I saw instructions on how to do this in an earlier post, using two different graphic boxes somehow, I haven't tried it yet -- it sounded complicated. 

      Also, once it is posted on the web, I don't want anyone else to be able to change the state (on or off) of the box. So I'm thinking I should maybe use the box tool. I'd put a line around the boxes. Then I would fill with black if it needed to be selected by me. I think this would assure that someone else could not turn off the checkbox once on the web... I'm so new at this, so there is probably a better way to do it...

      Would love other ideas? Thanks!!!!

        • 1. Re: Solid checkboxes?

          The simpler way to have a solid checkbox is to set its pen size to 3 pt.

          The simpler way to disable the changing of its state is to pubblish a form wich have the access to those check boxes disabled.

          • 2. Re: Solid checkboxes?

            Hmm. Don't know how to add a reply (this says it's an answer...)

            I don't think that the posted answer will work, (unless Im not understanding it correctly, which very well could be ;-).

            If I make the checkbox 3 pts. it does fill it in -- which is good EXCEPT it fills it in on all records. And I need different boxes checked on different records. But do please tell me if there is a way to only make the line wider on boxes on a single record (not in the layout tool).

            Also, I did wonder how to make checkboxes disabled?


            • 3. Re: Solid checkboxes?

              In the data tab of the inspector is a section labled "behavior" you can deny access to the field while in browse mode to disable your checkboxes.

              Since you want this for the web, you can't use conditional formatting or that would be an option.

              Setting up container fields for your boxes are likely the only way to do this.

              • 4. Re: Solid checkboxes?

                Well, I tried the boxes but it seems like, again, I can only change them (fill them) in the layout section, which changes them in all records. I'm wondering if someone knows a way to change a box from empty to solid in each individual record (in browse).

                Maybe Ill have to live with the ugly "x's"... :-(

                • 5. Re: Solid checkboxes?

                  Two ways can be used:

                  You can put the container fields in a related record. Set up your interface so that clicking the box assigns a value to a field used to relate your record in the main layout to this image record. With the box "unchecked" there is no link to this related image record so the image does not appear. Click the box, relationship is established and image appears.

                  A calculation field can be defined that returns a "container" type. It can read something like this:

                  If ( YourField = YourValue ; ContainerField ; "" )

                  Both approaches are easiest to implement if you define separate fields to store each "check box" value--which is what i am assuming with the above If function.

                  • 6. Re: Solid checkboxes?

                    Thanks so much for hanging in there with me! Gosh. It sounds good, but I'm not really following your instructions...I'm sorry to be such a pain.

                    Will both of these solutions work well when put up on the web? (And actually, I'm confused as two what the two solutions are -- does the second one start with the sentence "A calculation field...?)

                    Which would be easier for a novice (Never worked on filemaker or relating records, or with calculations before) to follow? I'd love more detailed instructions (or maybe you could point me toward a tutorial) on the solution you think would work best on the web.

                    Also, please remember, I don't want the person viewing it to be able to unclick the box... You suggested "In the data tab of the inspector is a section labled "behavior" you can  deny access to the field while in browse mode to disable your  checkboxes." I went to that tab, and didn't see a place to "disable" the check boxes. Don't see that option when I select my container either... But maybe I won't have to worry about disabling it, if it's a container?

                    I'm usually good at learning software, but so far, this program is making me feel pretty stupid. :-( But I appreciate your help.

                    • 7. Re: Solid checkboxes?

                      It's probably easier to show you than tell you.

                      Both methods require turning the check boxes into buttons that peform scripts. Using the Inspector to prevent access to the field isn't a good option with the scripted approach. With the scripted approach, your scripts could include code that checks to see if the current user is allowed to edit the check box values or you just create a matching layout and remove the scripts from the checkbox buttons.

                      With straight check boxes, you enter layout mode, select the field and then find the behavoir section in the Data tab of the inspector. There's a set of check boxes labeled "field entry". Clear the "Browse Mode" check box and you will no longer be able to modify this check box field on this layout. Create a second such layout where you haven't made this change and you have one layout were editing is permitted and one where it is not--that's the original approach suggested by Raybaudi.

                      Here's a download link to a demo file that implements this with two "check boxes":  http://www.4shared.com/file/P5GpX8og/ContainerFieldCheckBoxes.html

                      • 8. Re: Solid checkboxes?

                        Thanks for being so responsive! And for explaining the "browse mode" button, to not make it editable. But it sounds like it might not be a good option for this issue. Since I'll have over 200 records (sounds like each one would need to be a new record...)I did discover instead of making new records, I also could deselect "browse mode" from all the checkboxes AFTER I'd made each seperate record, but would need to reactivate them all to make any new records.

                        I'll have 50 possible checkboxes on each record, which is why I want to get this right. I'm hoping not to name them all something different, that would be pretty unmanageable (and probably make the page have to work harder on the web).

                        Sounds like it might work for me to make a small container (and re-use it for each item). Then add some kind of script that puts a black picture inside the container when it's clicked on -- Which is what I think is what you were suggesting with the following you wrote:

                        If ( YourField = YourValue ; ContainerField ; "" )

                        Where do I type that calculation in? Do I go under options for the container? Is that script a calculated value?

                        If my black picture was called "filled" and my container field is called "box" (Not sure what the yourfield would refer to... the container field?) Anyway, not sure how the calculation would be written. I see the formula, but don't know what I put where. :-(

                        But I'll try...
                        ( box = filled ; box ; "" ) 
                        When I types this in to the calulated value, it said it was looking for "filled" field. But it's a picture not a field. FYI: I'm going to store "filled" in a folder called "graphics". So I imagine it has to use that info somehow to locate it...

                        If will not take too much time, would you mind writing the script based on the above info. (Am I missing any info?) This might be the best way for me to begin learning about scripts -- to see my example in action.

                        I am assuming this option would work well on the web...

                        Thanks for your endless patience!

                        • 9. Re: Solid checkboxes?

                          Please take a closer look at the demo file. It demonstrates both the calculaiton and related field methods on different layouts. While easier to set up with individual fields. A text field storing a combined list of values could be used with the calculation field method. Be aware that you then have to use more sophisticated calculations to check to see if the value has already present in the list and also to add/remove values from this list when their respective check box is clicked.

                          If you examine how I designed the demo file, you'll find that I used a single image stored in a single container field to identify selected check box fields.

                          In my example, I used a spade image taken from a screen shot of a solitaire game. You could just as easily draw a black rectangle on a layout in filemaker, copy it to the clipboard, switch to browse mode and paste it into the container field to replace the spade with a black rectangle.

                          • 10. Re: Solid checkboxes?

                            I'm SO SORRY... I thought that file related to something else that we decided not to use (the checkbox feature). Will defintely look at the demo!!!!! Sorry I misunderstood. I'll let you know if I still have questions after viewing. You're the best!

                            • 11. Re: Solid checkboxes?

                              I just updated that file with a more sophisticated approach that allows you to store your checkbox values in a single field just like a conventional check box field. This field can even be formatted as a check box field if you wish and I've done so in the demo.

                              This method uses a portal, a global field listing the selected values for the current record and a script trigger that copies the selected values for the current record to the global field each time you move to a different record.

                              • 12. Re: Solid checkboxes?

                                I'm impressed with how patient and generous you are. I have to work on another project, but will study the demo after work.

                                Thank you again!

                                • 13. Re: Solid checkboxes?

                                  Thanks for all the trouble you went to. Alas, I couldn't figure out how you did the first one -- which is I guess the one closest to what I was trying to do. I couldn't figure out what your picture (the spade) was called, or  how you told the field to go look for it when it was clicked.

                                  I guess I'm in over my head. I'll just have to live with the ugly "X" boxes. Atleast I can get those to work ;-) My database looks like #3, except each entry is in a separate checkbox. Maybe I'll get brave enough to try to figure out how you set it up as a value lists... Ugh -- This software is so complicated!!!!!

                                  When I have time, I'll poke around this site and see if there any tutorials (things that take you thru step by step) on value lists. For now, I'll try to make peace with the ugly checkboxes (I'm a graphic designer, so I care about how things look) cuz after studying your spade example, I'm really no closer to understanding how all this works. My fault, not yours... Seems like I have to learn a whole lot more, before I even know what questions to ask.

                                  I wish Filemaker would add a feature that automatically makes the boxes filled in, not just X's. I bet a lot of people (who don't understand how to write the code) would prefer that look...

                                  Anyway, thanks for trying to help. I do appreciate your time.

                                  • 14. Re: Solid checkboxes?

                                    Solutions #1 and #3 use  calculation fields. You can enter layout mode, right click them and choose Specify Field... to see the field's name and the table occurrence box used to reference it. (Table Occurrences are the "boxes" found in Manage | Database | Relationships.)

                                    Once you know the name of the field, you can open Manage | Database | Fields and check out the field's definition. It should look familiar as I've posted the expression here in the thread.

                                    Each field is also set up as a button so that clicking the check box also performs a script. If you enter layout mode and double-click the field, you can find the name of the script assigned to it.