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.

Conditional buttons

Featured Replies

This must be so elementary I can't find anything about

it in the forums.  Forgive me, be as tolerant as you can ...

 

I've got FMPro 12;  on an iMac.

 

I've made a database of about 2000 people ("A").

And I've got a file ("B") of portraits of about 250 of them.

 

I have a button in A:  it uses the ID of a person

to find an entry in the portraits file B.  All that works fine.

 

Two problems:  

 

    1.  It would be good to grey out the button if the person

    hasn't got a portrait ---saves time, and is considerate to

    the user.   How do I do that?

 

    2.  Some of the people in A have got more than one portrait

    in B.  My working button finds the first one, but gives no

    indication that there's a second one; nor of course access

    to it.  Is there an elegant solution?

 

All help gratefully received.

 

jd

 

 

 

 

 

 

 but gives no indication that there's a second one; nor of course access to it.  Is there an elegant solution?

 

Why is that “of course”?

 

Try this example, which uses Conditional Formatting and the Go to Related Records script step. There's room for improvement; e.g. the whole window handling routines should be in their own scripts, because with some parametrizing, they're fairly universal applicable. Also, this example needed some example data, thus the portals; but you don't actually need them on the layout. 

 

btw, you could replace the calculation field with a variable, but then you'd need to declare a variable dynamically for each user, keep track of changes to initialize and update it, take care of screen refreshing etc, which might be a bit of a codeful at this stage.

CFButton_eos.fmp12.zip

  • Author

Many thanks for your trouble.

jd

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.