February 28, 201213 yr Hi All I came up with something I thought was pretty cool today so I decided I would like to share. I don't imagine it's an original idea or anything but I've not seen it mentioned anywhere. So in hopes that it might be useful to someone here goes... This is a small twist on a basic and familiar notes solution that allows for creating related notes that are viewed in a portal on the parent layout, with the ability to select a portal row to view the details in fields on the same layout. I have been experimenting with record creation using the Magic Key technique for those times when I don't wish to leave the layout, as discussed in this thread; http://fmforums.com/...__fromsearch__1 Today I was building a notes system using the Magic Key technique and I realized that the same TO and relationship that I added for creating the record could also be used to view the notes as well. That's it. That's the big epiphany. Hope it's worth sharing for someone 2/28 - 7:18 pm eastern Edited file to make the magickey field global and set an onRecordLoad script trigger to clear the selection when switching records 2/29 - 10:24 am eastern Added in the solution for retaining note being viewed record by record discussed below MagicKeyCreateView.zip
February 28, 201213 yr Author Here's a demo that uses the Magic Key technique to create and view records through a join table. The demo is for a task system where more than one person can be assigned to the task. 2/28 - 8:55 pm eastern Edited file to make the magickey fields global and set an onRecordLoad script trigger to clear the selection when switching records. Also switched the relationships around a bit. 2/29 - 10:09 am eastern Found a fatal flaw in the relationship setup. Removed the file. Will fix and reupload... 2/29 - 11:23 am eastern Fixed the fatal flaw. Added ability to retain task being viewed record by record as discussed below MagicKeyJoinDemo.zip
February 28, 201213 yr I'd say that's a compelling argument for using the MagicKey field over some of the other options mentioned in the post you linked to. One improvement: instead of selecting all the fields and using them as a button, use a text object with a single space (FileMaker delete's text object's with no text), then make sure it covers the entire row. Right now, you can click in-between or above/below fields and the script is not performed.
February 28, 201213 yr Author One improvement: instead of selecting all the fields and using them as a button, use a text object with a single space (FileMaker delete's text object's with no text), then make sure it covers the entire row. Right now, you can click in-between or above/below fields and the script is not performed. I agree. In the working system I have done just that. Just got a little sloppy with the demo :)
February 28, 201213 yr I am not quite sure what "Magic Key" is. However, I believe that the selection being stored a non-global field means that one user selects which record will be viewed by all users.
February 28, 201213 yr Author Good point. I'll have to think about that I had not made it global so it wouldn't keep the same data in the view fields when moving to another record. I supose I could make the fields global and clear them on record load. But then if a user leaves the record and comes back, they would have to reselect the portal row they were viewing... Hmmmm... More to think about. Well I am just experimenting. Learning alot too :twitch:
February 28, 201213 yr I am not quite sure what "Magic Key" is. http://www.filemakerhacks.com/?p=2364 I wasn't paying attention when I looked at the file apparently, because I just assumed it was global, since that's what the "Magic Key" method calls for.
February 29, 201213 yr I supose I could make the fields global and clear them on record load. You could use a global field with multiple lines - one for each parent/selected child combination. See also (for version 11): http://fmforums.com/forum/topic/71867-getting-more-out-of-filtered-portals-2view-selected-child/
February 29, 201213 yr Author I wasn't paying attention when I looked at the file apparently, because I just assumed it was global, since that's what the "Magic Key" method calls for. Yeah, Ummm. kind of an oversight on my part I'm fixing the files now
February 29, 201213 yr Author I adjusted the files to make the magickey fields global. I had not made it global so it wouldn't keep the same data in the view fields when moving to another record. Come to think of it, that's a problem using this type of view technique anyway, reguardless of how I am using it here with the magickey relationship and TOs. You could use a global field with multiple lines - one for each parent/selected child combination. See also (for version 11): http://fmforums.com/...selected-child/ And this is a beautiful solution. I love this!!
Create an account or sign in to comment