engelhardt Posted October 2, 2006 Share Posted October 2, 2006 i want to have the last (new) portal row be shown on top of the portal. I want to make an input-mask where the empty last creatable record of the relation is shown above all other related records and not at the bottom. How do i do that?? Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted October 2, 2006 Share Posted October 2, 2006 You can't — even if you sort the portal in reverse-creation-order (which you can do), so that the most recently created record rises to the top, the EMPTY row is going to stay at the bottom. You can fake it, but you'll need to use a "Save" or "Submit" button — put global fields directly ABOVE the portal with the button next to them, and the user fills the fields out, hits "Save" or "Submit" and a script goes to last portal row and sets the PortalRelationship::Fields to the values of the global fields and then sets the global fields to blank and commits the record when done. Quote Link to comment Share on other sites More sharing options...
engelhardt Posted October 2, 2006 Author Share Posted October 2, 2006 thanx for clearness. that's what i was afraid of. Quote Link to comment Share on other sites More sharing options...
Robert Schaub Posted October 2, 2006 Share Posted October 2, 2006 You Can't even ..... With 2 relationship , clever defining and a script attached to the blank field in the top portal , You Can See Attached demo #1500 Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted October 2, 2006 Share Posted October 2, 2006 I should never say never when it comes to what you can or cannot do in FileMaker. Waitaminnit, is that a paradox or something? Quote Link to comment Share on other sites More sharing options...
LaRetta Posted October 2, 2006 Share Posted October 2, 2006 Hi engelhardt, I prefer handling it all behind the scenes (WITHOUT Allow Creation). Have an ADD button above portal. Click button and: Freeze Window Go To Layout [ layout based upon portal table occurrence] New Record Set Field [ uniqueID ; Get ( ScriptParameter ) ] Commit Records/Requests [ without dialog ] Go To Layout [ original layout ] Go To Portal Row [ first ] Go to Field [ whatever to start User entry ] ... where the ADD button has script parameter attached of the main record's uniqueID and where the portal is sorted in reverse order of its natural sort state of creation order. When you return to the layout and pop into the first row, you WILL be on the record you just created. Users won't notice a thing. With vs. 8, you can use variables instead of script parameter to hold the uniqueID. I've used many methods mentioned here (and more that I won't admit to). This method is the easiest to implement and also very safe, in my opinion. smiley-laughing If you don't wish to reverse sort your portal, no prob ... just change Go To Portal Row [ first ] to [ last ] when you return to the layout (and leave your portal unsorted. It will be at the bottom but the User will be right on it - they won't have to scroll to get there which, I assume, is why you don't want that. Now ... if you have more than one portal to same table occurrence it can get tricky. You must select that portal and Arrange > Send To Back to be sure it's the first in stacking order. But that is rare occurrence. LaRetta Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.