Feirefiz Posted April 8, 2016 Share Posted April 8, 2016 They aren't any keyboard shortcuts [specially] for portals, are there? Navigation with the tab key works all right, but what about for creating a new record via portal? (Background, just in case anyone's wondering: I'm trying to make my solution more user-friendly for potential other users. I've got a table for people who have interactions with the archives, a join table for each transaction that takes place, then a further join table for the items belonging to that transaction. I was using two separate layouts, first creating the person in the person layout, then the transaction with a portal to the items in the transaction layout. But I decided that should someone need to record a transaction without me being around, they'll be annoyed that they can't add a new person directly in the transaction layout. So I added a 1-row portal to the transaction layout & am deciding how to make new record creation possible. Since I'm not a mousy person myself & don't want to be annoyed in daily life by my own attempts at user-friendliness, I'm primarily looking into non-button possibilities.) Link to comment Share on other sites More sharing options...
AHunter3 Posted April 8, 2016 Share Posted April 8, 2016 There are two kinds of portals: those for which record creation has been "enabled via this relationship" on the portal side, thus yielding a blank row at the bottom always awaiting new data to spawn a new record to hold it, and those that don't have that. A single keystroke for "new portal record" will require a script if the blank portal row is not present, but a simple Go to Portal Row [Last, no dialog] should suffice if it is. Hmm, OK, you also need to enable the scroll bar option for the portal lest the number of visible portal rows cut off access to the empty bottom row. But essentially to the user's perspective a new portal row has been "created" already (it actually hasn't, but it gets created the moment the user begins typing in portalrow fields). For the other kind of relationship you need to do something akin to: Set Variable [$PrimaryKey; LocalTable::Primary Key] New Window ["make Record"] Go to Layout [PortalTable Layout] New Record/Request Set Field [PortalTable::Foreign KeyField; $PrimaryKey] Commit Record/Request [no dialog, no validation] Close Window [$make Record"] Go to Portal Row [Last, no dialog] Either method can be assigned a keystroke in Custom Menu-land. With some evalution of context you could even write a script that examines where the cursor is and interprets ⌘-N as "execute the new portal row subscript" if cursor is in the portal and user is in Browse Mode, otherwise does a plain-vanilla New Record. Link to comment Share on other sites More sharing options...
Feirefiz Posted April 14, 2016 Author Share Posted April 14, 2016 Thanks so much, AHunter3; I am slowly & deeply thinking this over. I'm wondering whether you use this method (one-line portal) or another in a similar situation, where you want to show/add a record from another table? Link to comment Share on other sites More sharing options...
eos Posted April 14, 2016 Share Posted April 14, 2016 (edited) Something to ponder: Use a one-row portal based on a relationship that allows creation, and filter it with: IsEmpty ( PortalTO::primaryKey ) That will get rid of all the real records, and only leave the spare row – which, once you have entered data, will re-appear, because the record you just created now is a real record with a primary key. Now place that one-row portal above the “regular” portal that has regular rows and the spare row – easy access to record creation in a predictable place. Note that you cannot use the negation of that expression to get rid of the spare row – that row is an attribute of the relationship, not the portal. You could of course create two identical relationships, one that allows creation, one that doesn't; use the one that does for a filtered portal with just the spare row, and the other one for display/editing. Edited April 14, 2016 by eos Link to comment Share on other sites More sharing options...
Feirefiz Posted April 18, 2016 Author Share Posted April 18, 2016 Still pondering & trying & getting stuck but still working on it. I'm wondering, though… eos, with your idea, I end up with 2 portals for the same information. I judge that to be confusing for the uninstructed user. (Yeah, ok, probably a button to create a new record would be least confusing… or maybe even a button to open a new window to go to the said people layout.) So I'm wondering from the user-friendliness perspective, what do you (all) find smoothest? Link to comment Share on other sites More sharing options...
Feirefiz Posted April 18, 2016 Author Share Posted April 18, 2016 Still pondering & trying & getting stuck but still working on it. I'm wondering, though… eos, with your idea, I end up with 2 portals for the same information. I judge that to be confusing for the uninstructed user. (Yeah, ok, probably a button to create a new record would be least confusing… or maybe even a button to open a new window to go to the said people layout.) So I'm wondering from the user-friendliness perspective, what do you (all) find smoothest? Link to comment Share on other sites More sharing options...
eos Posted April 18, 2016 Share Posted April 18, 2016 with your idea, I end up with 2 portals for the same information. I judge that to be confusing for the uninstructed user. No, you have one “normal” portal for display, and above that a one-row portal filtered to only show the “spare” row. As soon as you enter data in the spare row and commit it, the new record will appear in the regular portal, and the one-row portal will again be empty. Link to comment Share on other sites More sharing options...
eos Posted April 18, 2016 Share Posted April 18, 2016 with your idea, I end up with 2 portals for the same information. I judge that to be confusing for the uninstructed user. No, you have one “normal” portal for display, and above that a one-row portal filtered to only show the “spare” row. As soon as you enter data in the spare row and commit it, the new record will appear in the regular portal, and the one-row portal will again be empty. Link to comment Share on other sites More sharing options...
Feirefiz Posted April 19, 2016 Author Share Posted April 19, 2016 I'm with you so far. It's just strange when something thinks: why do I have to put the new row THERE; why can't I put it exactly where I want it to be? So I was wondering if this is something you (for example) actually do. Link to comment Share on other sites More sharing options...
eos Posted April 19, 2016 Share Posted April 19, 2016 So I was wondering if this is something you (for example) actually do. Only for sample file and prototypes. For more complex solutions, I script record creation. Link to comment Share on other sites More sharing options...
Feirefiz Posted April 20, 2016 Author Share Posted April 20, 2016 Ok. [i love working with FileMaker. Sometimes, though, I wish we could just hire one of you guys!] Link to comment Share on other sites More sharing options...
AHunter3 Posted April 20, 2016 Share Posted April 20, 2016 (edited) System appears to be broken. Can't get to page 2. Tried posting earlier and got an error. Trying again. Can only view this post by changing my settings to "40 posts per page". Which seems to be the maximum I can set it to, and sooner or later there will be a thread with > 40 posts. Something ain't working. Edited April 20, 2016 by AHunter3 Link to comment Share on other sites More sharing options...
Feirefiz Posted April 21, 2016 Author Share Posted April 21, 2016 When logged in to this forum I use the "default style" layout & whatever other settings I have set allow me to see your post, but when I'm not logged in, I don't see it, nor do I see where to go to the next page – or any other indication that your post exists when viewing this page. Link to comment Share on other sites More sharing options...
Recommended Posts