Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Boolean Toggle Icon in Find Mode


This topic is 4193 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have some layouts where I've implemented an icon for toggling a boolean field. My implementation is to place on the layout an unstored calc field, called z_button_publish, with calculation Case ( Reagent::status = 1 ; Graphics::%CHECK_24 ; Reagent::status = 0 ; "" ) Where Reagent::status references the boolean, and Graphics::%CHECK_24 is a global container with a checkmark graphic. This field object is set to perform a script on click, which simply sets the Reagent::status field to not Reagent::status, which effectively toggles the value between 0 and 1, which forces the graphic in this unstored calc to update to a check mark when it is 1. This is all fine and good in browse mode. However, the problem is, when you go into Find mode, the current setup does not allow you to search on this status field, since it is not directly displayed, and even if it were displayed, it would make for a pretty ugly presentation. One option would be to use a checkbox set which is set to the status field, sized to only show the '1' option, with the same boolean toggling script attached. But I rather like the checkmark graphic which is available in Browse mode, it looks a bit more polished than showing the default graphics of checkboxes and radio buttons. The ideal behavior would be you could essentially toggle this graphic icon and the referenced status field by clicking on the icon in Find mode the same way you do in Browse mode. But I'm at a loss as to how I would go about doing that. Is there a way to implement this sort of behavior? Thanks in advance for any advice!

Posted

Do a search on Google for site: fmforums.com Find using checkbox

 

 

and, we just had a thread HERE that seems to be the same question.

Posted

Do a search on Google for site: fmforums.com Find using checkbox

 

 

and, we just had a thread HERE that seems to be the same question.

 

Thanks for your post, Lee.  Please forgive me if I'm being obtuse, but I'm not sure what performing a find on a field with a checkbox control style has to do with what I'm trying to achieve, or why I would think to search for that.  I'm trying to use a graphical icon (already implemented and working good in browse mode) to work in find mode as well.  Putting a checkbox control style on the actual boolean field itself would certainly be the easy way out (and probably what I'll resort to if I can't get my graphic icon working in find mode) but I'm trying to achieve a fancier looking interface than that if I can.

 

This did get me trying other things like using a regular container field instead of an unstored calc for the graphic and toggling it in the same script that toggles the boolean, but it appears FileMaker will not allow Set Field on a container.  So I'm back to the same problem; nice graphical checkmark icon attached to a script to toggle the boolean in browse mode, nothing in find mode.

 

Feel free to call me a big dummy if I am one, but could you give a hint as to how that search and link you provided are relevant to what I'm trying to do?

Posted

Conditional formatting works in find mode.

 

Instead of having an unstored calculation update, why not have the the image always display, with a "filled" text area covering it. Use conditional formatting to reveal the graphic.

Posted

Conditional formatting works in find mode.

 

Instead of having an unstored calculation update, why not have the the image always display, with a "filled" text area covering it. Use conditional formatting to reveal the graphic.

 

That's just the trick I was looking for.  Thanks David!

This topic is 4193 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.