September 4, 201312 yr 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
September 4, 201312 yr 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
Create an account or sign in to comment