Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Boolean Toggle Icon in Find Mode

Featured Replies

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!

Solved by David Jondreau

Go to solution

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.

  • Author

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?

  • Solution

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.

  • Author

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!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.